Hi Benoit,
I couldn't resist and had to run your benchmarks on my machine:
Using your benchmark program with
clang++-3.7 -I../../eigen src/eigen_bench.cpp -O3 --std=c++11 -Wextra -o eigen-bench:
Muliplying 16x16 matrices at 5.12238 GFlop/s
Muliplying 32x32 matrices at 7.50102 GFlop/s
Muliplying 64x64 matrices at 8.55368 GFlop/s
Muliplying 128x128 matrices at 9.27711 GFlop/s
Muliplying 256x256 matrices at 9.35405 GFlop/s
Muliplying 512x512 matrices at 9.23213 GFlop/s
Muliplying 1024x1024 matrices at 9.46971 GFlop/s
g++ -I../../eigen src/eigen_bench.cpp -O3 --std=c++11 -Wextra -o eigen-bench:
Muliplying 16x16 matrices at 5.47811 GFlop/s
Muliplying 32x32 matrices at 7.99462 GFlop/s
Muliplying 64x64 matrices at 9.36033 GFlop/s
Muliplying 128x128 matrices at 10.2681 GFlop/s
Muliplying 256x256 matrices at 10.3274 GFlop/s
Muliplying 512x512 matrices at 10.1237 GFlop/s
Muliplying 1024x1024 matrices at 10.4419 GFlop/s
Generated Enscripten result:
Multiplying 16x16 matrices at 0.89 GFlop/s
Multiplying 32x32 matrices at 1.1 GFlop/s
Multiplying 64x64 matrices at 1.21 GFlop/s
Multiplying 128x128 matrices at 1.27 GFlop/s
Multiplying 256x256 matrices at 1.3 GFlop/s
Multiplying 512x512 matrices at 1.3 GFlop/s
Multiplying 1024x1024 matrices at 1.31 GFlop/s
This is with the latest eigen via hg clone.
g++ version 5.2.1 and clang++ 3.7.0-2ubuntu4
Firefox version 45..0
Ubuntu 15.10 with 2.0 GHz dual core Intel Xeon 5130 processors.
Interesting that just recompiling with g++ instead of clang++ gives a 1GFlops/s performance increase at the largest matrix sizes...
Nice benchmark,
Ben
On Tuesday, April 5, 2016 11:09 AM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
In that example, we were compiling a standalone Eigen-using program.
Now here is a different example, compiling a Eigen-using function to _javascript_, then having handwritten _javascript_ code call it.
See attachment: eigen-emscripten.tar.gz
Cheers,
Benoit