3 ms·
It varies naturally per application. When I was doing a little prototyping before deciding to write the core of our ranking algorithm in C++ I took the tightes
by wheels 18y ago
It varies naturally per application. When I was doing a little prototyping before deciding to write the core of our ranking algorithm in C++ I took the tightest inner loop and compared C++, Java, Python, Ruby and Perl. For floating point numerics and lots of list traversal the results were:
- C++ | baseline
- Java | 2.5x baseline
- Perl | 4.5x baseline
- Python | 6x baseline
- Ruby | 14x baseline
As a result, we're using C++ where it really matters, Java where it kind of matters and Ruby where it doesn't. This was more than a year ago though, so any performance gains since then naturally aren't included.