What would be the best way to create / save / load a large dictionary?

To me it looks more like a simple array of floats than a dictionary… knowing the index, step and start wavelenght is then enough to get a very fast access to any part you may want, and dumping/loading that to/from a file should be very fast.

Have you tried to simply convert the dictionary to JSONItem and save/load its string? Maybe that makes the dictionary redundant anyway. JSONItem should be able to retrieve data quite fast (or JSONMBS at least).

1 Like

In my experience I have found Xojo’s JSON to be slow with serialization. IMHO if you want to use a “dictionary” of sorts that’s fast, the built-in one to the Mac OS is fast for access and serialization (especially when used with the binary property list format).

I know JSONItem was quite slow, but I heard it became much faster in one of the recent versions. I did not test it because I usually use JSONMBS which has a really great performance.
As Dictionaries and JSONItems are interchangeable, it might be a convenient way to save and load the dict still.