Comparison of the performance of 20 programming languages

The second edition of the PLB (Programming Language Benchmark) project has been published, aimed at testing the performance of solutions to standard problems across various programming languages. Unlike the first edition published in 2011, the new version measures the performance of code for matrix multiplication and the 15-Queens problem, and additionally evaluates the solution search in Sudoku and the determination of intersections between two arrays. The test code was written in 20 programming languages.

The highest performance was shown by the implementation of test applications in C (when compiled with clang). The second place went to Zig, followed by Nim in third, and Mojo in fourth. Following them are D, Java, the Bun JavaScript platform, and Rust, while Go, Crystal, and V follow closely behind.

Comparison of the performance of 20 programming languages

Relatively good results were also shown by Node.js, Dart, Julia, and C#. The good results of Java and C# can be attributed to the use of a distinct JIT compilation stage, whereas Dart, Bun, Node.js, Julia, LuaJIT, PHP, PyPy, and Ruby3 (YJIT) perform JIT compilation on the fly, affecting only frequently executed code. The Bun JavaScript platform significantly outperformed Node.js. Relatively slow results were observed for Julia and Swift. The worst performance metrics were demonstrated by PHP, Ruby, Perl, and CPython, with PHP's performance being approximately four times better than CPython.

Comparison of the performance of 20 programming languages


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster