News for hackers. Stuff that matters.
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:

  canada.json          -->   31 ms,   73 MB/s
  citm_catalog.json    -->   13 ms,  135 MB/s
  code.json            -->   17 ms,  113 MB/s
  example.json         -->    0 ms,   73 MB/s
  sample.json          -->    6 ms,  124 MB/s
  twitter.json         -->    6 ms,  114 MB/s
[1] https://gist.github.com/youurayy/18553475c5a9f81a17345cddeeb...
Re:Building a high performance JSON parser by tptacek on Sunday June 28, 2020 @01:04PM (#23670212)
Is that code unmarshalling to types?
Re:Building a high performance JSON parser by ypcx on Sunday June 28, 2020 @01:59PM (#23670673)
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.
Re:Building a high performance JSON parser by tptacek on Sunday June 28, 2020 @02:05PM (#23670719)
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