3 ms·
Unrelated but I found this but in the repo interesting: (Under the heading “is it rapid?” Measuring performance). > The 450MB/s read rate for JSON puts ryml s
by dmix 6y ago
Unrelated but I found this but in the repo interesting:
(Under the heading “is it rapid?” Measuring performance).
> The 450MB/s read rate for JSON puts ryml squarely in the same ballpark as RapidJSON and other fast json readers (data from here). Even parsing full YAML is at ~150MB/s, which is still in that performance ballpark, albeit at its lower end. This is something to be proud of, as the YAML specification is much more complex than JSON: 23449 vs 1969 words.
How did YAML get so complicated. I’d assume it would be much more similarity YAML’s quirks adding a few extra things to work on. But that spec is quite huge by comparison (of words alone).
- dragonwriter 6y ago> How did YAML get so complicated YAML has both more syntactical options, and broader semantic coverage; particularly, it includes the concept of schemas defining YAML profiles. Also, the YAML spec has much more informational content. Examples are a stark illustration: RFC 8259 has 5 example JSON documents (3 of which are simple scalar values). The preview chapter of the YAML 1.2 spec has 28 examples, only a handful of which are single scalars.
- imtringued 6y agoI'm a fan of the parts of YAML that work. I wish there was a universally acknowledged strict YAML standard similar to 'use strict' in Javascript. There are some solid ideas embedded in YAML but the warts make people yell at it. It's also being abused for things that it really isn't meant to do like Ansible.