Re:Performance Showdown: Rust vs Javascript (2020)
by rossmohax on Friday February 12, 2021 @09:55AM
(#26114256)
What if you add PGO to the mix, how fast it is going to be?
Re:Performance Showdown: Rust vs Javascript (2020)
by gregod on Friday February 12, 2021 @10:36AM
(#26114793)
Weirdly enough, PGO equalizes and increases the runtime, where both methods take approximately 330 us. (I simply applied PGO to the full benchmark harness, no idea if this is proper). Them being equal sounds more reasonable, but the increase in runtime doesn't feel right.
Micro benchmarking remains a fickle beast :)
Out of curiosity, I just did a small benchmark (criterion) using the input.txt provided, and reordering results in a 10% difference:
This feels weird since the input.txt contains few pairs of equal characters, so there is likely something else going on. The inequality is very inexpensive but the ignore case compare should not be that expensive either.