Re:Building a high performance JSON parser
by ypcx on Sunday June 28, 2020 @12:28PM
(#23669893)
I've tried to parse those test files in Deno (in a very rudimentary test[1]), the results (on my i9-9980HK @ 2.40GHz) are:
[1] https://gist.github.com/youurayy/18553475c5a9f81a17345cddeeb...
[ Parent
| on HN ]
Is that code unmarshalling to types?
Deno is a JavaScript runtime built in Rust, so I guess it depends what you mean by "types". Definitely not a strong typing, although the example could be rewritten to TypeScript, which Deno supports natively.
I use Deno sometimes, so it was of interest to me to compare it to the advancements presented here for Go.
I like Deno (v8 is written in C++, not Rust, for what it's worth); the question is just: is it doing the same work that the encoding/json benchmark is doing? What are we comparing?
Re:Building a high performance JSON parser
by Matthias247 on Sunday June 28, 2020 @08:42PM
(#23673266)
You can see in the linked code that it just calls `const parsed = readJsonSync(fileName)`, which likely returns an untyped struct. So this purely does parsing into an anonymous structure, and not validation and mapping into something strongly typed