top | item 21884869

(no title)

RX14 | 6 years ago

JSON is actually implemented entirely in Crystal for Crystal, I'm pretty sure it's the same for Nim too.

For a language which claims to be fast, having to use a C-based JSON parser would be a bit of a cop-out :)

discuss

order

sweeneyrod|6 years ago

But using an existing parser that happens to be written in C could definitely be sensible.

RX14|6 years ago

Yes, we do so for more complex formats like YAML and XML. However, for JSON, reimplementing is worth it for binary portability.

imtringued|6 years ago

That sounds like a pretty awful idea. If you're using a C library for parsing JSON then you must add an additional C to Nim/Crystal conversion step that requires additional RAM and CPU time.

SolitudeSF|6 years ago

it still compares algorithm implementation, not the language speed.