Re:
Making Rust as Fast as Go Hey all, as some keen-eyed commenters have pointed out, it looks like the rust program is not actually equivalent to the go program. The go program parses the string once, while the rust program parses it repeatedly inside every loop. It's quite late in Sydney as I write this so I'm not up for a fix right now, but this post is probably Fake News. The perf gains from jemalloc are real, but it's probably not the allocators fault. I've updated the post with this message as well.
The one-two combo of 1) better performance on linux & 2) jemalloc seeming to fix the issue lured me into believing that the allocator was to blame. I’m not sure what the lesson here is – perhaps more proof of Cunningham’s law?
https://en.wikipedia.org/wiki/Ward_Cunningham#Cunningham's_Law [
https://en.wikipedia.org/wiki/Ward_Cunningham#Cunningham's_Law]
chrfrasco,
8 hours ago