Maybe it’s time we invent JPUs (json processing units) to equalize the playing field.
The best I can do is an ML model running on an NPU that parses JSON in subtly wrong and impossible to debug ways
Until then, we have simdjson https://github.com/simdjson/simdjson
Well, do you have dedicated JSON hardware?
Rockstar making GTA online be like: “Computer, here is a 512mb json file please download it from the server and then do nothing with it”
Someone just needs to make a GPU-accelerated JSON decoder
CPU vs GPU tasks I suppose.
GPU, render my 4.2 MB json file!
I’m afraid I can’t do that, Dave
Given it is a CPU is limiting the parsing of the file, I wonder how a GPU-based editor like Zed would handle it.
Been wanting to test out the editor ever since it was partially open sourced but I am too lazy to get around doing it
That’s not how this works, GPUs are fast because the kind of work they do is embarrassingly parallel and they have hundreds of cores. Loading a json file is not something that can be trivially parallelized. Also, zed use the gpu for rendering, not reading files.
As far as my understanding goes, Zed uses the GPU only for rendering things on screen. And from what I’ve heard, most editors do that. I don’t understand why Zed uses that as a key marketing point
To appeal to people who don’t really understand how stuff works but think GPU is AI and fast
there are simd accelerated json decoders
every day we stray further from god
Don’t worry, they still make extensive use of regexes.
I didn’t think any JSON parsers used regex given how simple the grammar is… but I’ve seen some horrors, so I shouldn’t rule it out.
Would you rather have 100,000 kg of tasty supreme pizza, or 200 kg of steaming manure?
Choose wisely.
I have the same problem with XML too. Notepad++ has a plugin that can format a 50MB XML file in a few seconds. But my current client won’t allow plugins installed. So I have to use VS Code, which chokes on anything bigger than what I could do myself manually if I was determined.
Time to train an LLM to format XML and hope for the best
Do we need a “don’t parse xml with LLM” copypasta?
L arge L regex M odel