3 ms·
A tiny note on the speed comparison: The 23,000x faster single-key lookup seems a bit misleading to me. Once you get the computational complexity advantage, th
by dietr1ch 7mo ago
A tiny note on the speed comparison: The 23,000x faster single-key lookup seems a bit misleading to me.
Once you get the computational complexity advantage, then you can make it as much times faster as you want. In these cases small instances matter to judge constants, and to the average (mean?) user, mean instance sizes.
I'm not sure how to sell the advantage succinctly though. Maybe just focus on "real-world" scenarios, but there's no footnote with details on the comparison
- creationix 7mo agoThat benchmark is a fair comparison for a real-world production workload and use case. Sadly I can't share the details. But suffice it to say that the dataset is a huge object with tens of thousands of paths as keys and moderately large objects as values (averaging around 3KB of JSON each) all with slightly different shapes. The use is reading just a few entries by path an then looking up some properties within those entries. The benchmark (or is supposed to) measures end-to-end parse + lookup. JSON: 92 MB RX: 5.1 MB Request-path lookup: ~47,000x faster Time to decode a manifest and look up one URL path: JSON: 69 ms REXC: 0.003 ms Heap allocations: 2.6 million vs. 1 JSON: 2,598,384 REXC: 1 (the returned string)