3 ms·
> It _is_ much worse than the two-byte "overhead" of one s-exp node. I don't believe you. Atoms are roughly the same, and compounds, well: [1,2,3] vs (1 2
by tonyg 7y ago
> It _is_ much worse than the two-byte "overhead" of one s-exp node.
I don't believe you. Atoms are roughly the same, and compounds, well:
[1,2,3] vs
(1 2 3)
{"a":1,"b":2} vs
(("a"1)("b"2))
I suppose if you have a lot of booleans you might save a little by using T/NIL or #t/#f, but otherwise it's more or less a wash.
(You might suggest plists, ("a"1"b"2), for dictionaries, in which case you save a whopping two bytes per entry. But I'd choose the nested-list format over plists, if I were encoding a dictionary into an S-expression.)
- viraptor 7y ago> you save a whopping two bytes per entry Which pretty much disappears when compressed anyway.