3 ms·
Haskell and that particular div -> shift trick were two unrelated examples. The Haskell one is kind of a long story. In short, we love Haskell but a particula
by chadaustin 11y ago
Haskell and that particular div -> shift trick were two unrelated examples.
The Haskell one is kind of a long story. In short, we love Haskell but a particular inner loop was destroying our performance. We were getting PHP-level performance in Haskell, where normally we can expect Java-level performance. So we took this inner loop (JSON encoding and URL encoding) and built BufferBuilder to solve it once and for all. Now JSON encoding and URL encoding are barely visible in the timings.
The div -> shift trick is worth knowing about, though I haven't had a reason to use it yet.