Closed inejc closed 2 years ago
O, man! I miss reviewing your code.
Thanks @inejc for taking the time and look into this challenge and play with us! I LOVE IT!
I hope u are not too cold up on the north and hope we catch up soon!
Regards!
P.s.: I'll make attributions/credit change in separate push.
Adding an imperative example (
compress_fast
) and a more functional one (compress_slow
). The functional one could be optimized further as the accumulate currently does a bunch of copies internally + string concatenations do copies too :).Anyway, here are mean timings for a 20000 chars long string (averaged over 5k iterations):