For a side project of mine, I recently re-wrote the same code in a dozen or so languages. The application reads input data from text file and does a bunch of conversions to integers and floats (atoi and atof). It then runs through an algorithm that does calculations and identifies proper actions. Finally, it writes the output data as formatted text file. Regardless of implementation, it runs quick. Sorry I can't provide more details on nature of the code (it has IP that belongs to another person).
Here are the top 10 best execution times (all run on same hardware). Times obtained by 'time' utility (e.g., "time ./run.sh"). Some of these were run on Ubuntu 16.04 and a few were run on FreeBSD 11.2. Where the compiler has optimization flags, I used it.
1. C++ 0.04 (gcc version 5.4.0) 2. Rust 0.11 (version 1.37.0) 3. Go 0.13 (version 1.12.7) 4. D 0.16 (tied with Pascal) (DMD64 D Compiler v2.073.2-devel) 5. Pascal 0.16 (tied with D) (fpc 3.0.2) 6. C# 0.25 (mono 4.8.1) 7. Nim 0.50 (1.0.0) 8. Kotlin 0.81 (Kotlin version 1.3.50-release-112, JRE 1.8.0_222) 9. Java 0.95 (openjdk version "1.8.0_131") 10. Scala 1.79 (version 2.12.2, running on 1.8 openjdk)
1. C++ 0.04 (gcc version 5.4.0)
2. Rust 0.11 (version 1.37.0)
3. Go 0.13 (version 1.12.7)
4. D 0.16 (tied with Pascal) (DMD64 D Compiler v2.073.2-devel)
5. Pascal 0.16 (tied with D) (fpc 3.0.2)
6. C# 0.25 (mono 4.8.1)
7. Nim 0.50 (1.0.0)
8. Kotlin 0.81 (Kotlin version 1.3.50-release-112, JRE 1.8.0_222)
9. Java 0.95 (openjdk version "1.8.0_131")
10. Scala 1.79 (version 2.12.2, running on 1.8 openjdk)