Re:New JSON encoder for Haskell that is up to 3x faster than...
by unhammer on Monday October 19, 2020 @08:20AM
(#24825652)
Oh, I was thinking more of memory usage (there's a huge difference between plain aeson and buffer-builder there, with large files), but I guess I should just give it a go :-)
[ Parent
| on HN ]
Re:New JSON encoder for Haskell that is up to 3x faster than...
by nikita-volkov on Monday October 19, 2020 @08:30AM
(#24825714)
It might be the case that your memory usage data on "aeson" is outdated. Prior to some later releases it was rendering in two passes: first into AST (the Value type) than from that into ByteString (Builder). It's likely that your extended memory usage was coming from that. Later they had the `Encoding` abstraction introduced to avoid that 2-pass problem. Both "jsonifier" and "buffer-builder" avoid that 2-pass problem by design.