Benchmarking 20 programming languages on N-queens and matrix multiplication
1–10 of 194 posts
Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#2Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#3I would expect Mojo to perform better in these settings.
Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#4Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#5There appears to be roughly the same code structure, ported to every language, while for some languages, arbitrary optimizations are introduced (such as using `array` instead of `list` in Python).
But nobody working in Python uses matrix multiplication code written in Python. They use NumPy, which is a de facto standard library for people working in the relevant fields. It's as much part of "Python" as list comprehensions.
Without taking such real-world conventions into account, such comparisons say essentially nothing about the languages involved (and their all-important ecosystems).
Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#6This is only true when three matrices are independent of each other, and also why C has a `restrict` qualifier that enables this assumption. The benchmark itself has no such assumption because all three variables are defined as `double **`, and it can be verified by assembly outputs. Clang's excellent performance in matmul is probably much more due to autovectorization.
Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#7Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#8Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#9PHP results: I was stupid enough to write some scientific code in PHP once so know how slow it can be - mostly around array access and manipulation. But if your going to try, use the HHVM interpreter. It's much faster and is a drop in replacement for the PHP interpreter. Hack ( https://hacklang.org/ ) uses that under the hood by default.
Re: Benchmarking 20 programming languages on N-queens and matrix multiplication
#10Given that its become increasingly more common for CPUs to have both Performance & Efficency cores … how do benchmarks ensure they are only being run on the P-cores?