It's pretty awesome to have c++ code running in jupyter ๐ And that could be integrated to blogs using sphinx.
But when I'm writing something related to program efficiency, it appears that xeus-cling kernel seems very slow.
Take example of 1024*1024 matrix multiplication, when compiled by clang++, running the program costs 170 ms; but for xeus-cling jupyter kernel, it costs 3000 ms.
It appears that the more levels of loops, the worse efficiency.
I wonder if xeus-cling is not intended and not recommended to demonstrate code efficiency. Or maybe I miss anything ๐ฟ Thanks in advance.
Compile by clang++:
$ clang++ matmul.cpp -march=native -O3 -std=c++11
xeus-cling kernel (configuration file located at ~/.local/share/jupyter/kernels/xcpp14/kernel.json)
Hi devs!
It's pretty awesome to have c++ code running in jupyter ๐ And that could be integrated to blogs using sphinx. But when I'm writing something related to program efficiency, it appears that xeus-cling kernel seems very slow.
Take example of 1024*1024 matrix multiplication, when compiled by clang++, running the program costs 170 ms; but for xeus-cling jupyter kernel, it costs 3000 ms. It appears that the more levels of loops, the worse efficiency.
I wonder if xeus-cling is not intended and not recommended to demonstrate code efficiency. Or maybe I miss anything ๐ฟ Thanks in advance.
Compile by clang++:
xeus-cling kernel (configuration file located at
~/.local/share/jupyter/kernels/xcpp14/kernel.json
)Matrix program