What does HackerNews think of packedjson?

packedjson is an alternative Nim implementation for JSON. The JSON is essentially kept as a single string in order to save memory over a more traditional tree representation.

Language: Nim

Same ideas are used in Nim's incremental compilation (wip) https://github.com/nim-lang/Nim/tree/devel/compiler/ic Also there are two JSON implementations with a flat architecture https://github.com/Araq/packedjson and https://github.com/planetis-m/packedjson2 (this one I wrote) But I agree it's a pain to write it like that.
Status dev here (i.e. colleague with the benchmarker) and prolific high-performance Nim libraries author.

Note that Nim standard library focuses on maintenance cost as the Nim team is small. When raw performance is needed, Nim gives us the tools to reach for it.

For instance at Status we use our own json serialization/deserialization library: https://github.com/status-im/nim-serialization and even Araq, Nim language creator, has his own JSON library: https://github.com/Araq/packedjson

This allows Nim to be in the top10 of json parsing in TechEmpower: http://www.techempower.com/benchmarks/#section=data-r18&hw=p...

Disclaimer: Status is the main sponsor behind Nim https://our.status.im/status-partners-with-the-team-behind-t... / https://nim-lang.org/blog/2018/08/07/nim-partners-with-statu...

Status is committed to Nim but we do have a pretty diverse stack (i.e. most of our code is in Clojurescript and we have part of the codebase in Go that we are migrating to Nim at the moment) and teams work very independently from each other, so other teams are sharing back their experiences with Nim.

Something to keep in mind while looking at the benchmarks in this article:

* Nim's `json` module will parse the full JSON file into memory, now I might be mistaken but AFAIK Crystal doesn't do this. The JSON module in the stdlib is good enough for most use cases, but there does also exist `packedjson`[1] which could be more performant for some use cases

* Regarding the base64 benchmark, you may want to read this: https://forum.nim-lang.org/t/5363 (this article does not include the patches made by treeform)

Benchmarks are easy to game, the only takeaway that can be had from an article like this is that on average the performance of software written in Crystal and Nim should be about the same.

1 - https://github.com/Araq/packedjson