Red Rozenglass on Nostr: I assumed the foundational use of strings in xs and xs*json would have been to keep ...
I assumed the foundational use of strings in xs and xs*json would have been to keep the JSON in memory as strings without actually parsing it until needed, on demand, just for accessed fields. That's what I'm usually used to in performant C JSON libraries. But like I said, I didn't look into xs in depth before speaking. Prompted by your post I did some micro-benchmarks, and yup, you're right, whatever xs and xs*json are doing seems to be some three-times slower than Python when loading and reading some doubles from a snac JSON file repeatedly (the file for your post specifically). :)
See screenshot of code and results, apologies for the crammed code / color theme.
https://fedi.dreamscape.link/rozenglass/s/dc0ad320aa53cf34c770587a2ce323c4.chttps://fedi.dreamscape.link/rozenglass/s/b284a28710cce90d9d9be3a7f4cabc8e.py