The performance results I got from your original code aren’t like the ones you saw, which is interesting.
Rust: 38.819887975s
Crystal: 18.292799228
On the latest version you posted, I do get pretty equivalent performance (within 1.5%):
Rust: 6.641630889s
Crystal: 6.730964135
I didn’t look much into the code itself but I enjoy comparing Crystal performance to that of other languages. It amuses me how often Crystal comes out ahead of the “fast” languages, like when I compared Crystal to Rust with Redis where Crystal was up to 3.13x as fast.