4 ms·
C++ Expression Templates: Eigen, Blaze, Fastor, Armadillo & XTensor (2020)
- gok 4y agoIt's really unfortunate that C++ keeps adding more functionality that makes one of its critical problems (horrible syntax debugging) worse. All of these libraries generate atrocious compiler errors for even trivial typos.
- syockit 4y agoGood article. Next time I ever want to revisit using C++ for scientific calculation again I'll keep in mind that Fastor has the fastest compilation time of all. Still, 2 seconds for just a benchmark code is a bit too much. I remember doing this kind of finite difference stencil templating using plain C++. All the performance gains went out of the window as soon as the array size becomes dynamic.
- lostdog 4y agoBonus points for measuring the compile times. Unfortunately matrix libraries are the types of things that really challenge C++, and the compiler devs haven't been able to bring the compile times down to reasonable levels yet.
- Const-me 4y ago> We now also have explicit SIMD vectorisation.. So say on an AVX512 enabled architecture you can compute the dot product of two vectors I wonder will it be good? Computing dot product efficiently is harder than it seems, example: https://stackoverflow.com/a/59495197/126995 https://stackoverflow.com/a/59495197/126995 Eigen usually does stuff like that rather well.
- sfpotter 4y agoCompile times like these are why I avoid C++ for numerical programming these days.