8 ms·
Why exactly is this better than atlas / blas / any library using it, e.g. Eigen?
by go_elmo 5y ago
Why exactly is this better than atlas / blas / any library using it, e.g. Eigen?
- optimalsolver 5y agoEdit: I misread the article.
- singhrac 5y agoI’m confused by you posting this link. The conclusion at the end of the post is that Eigen is the fastest library? Did I miss something?
- sgillen 5y agoFrom the end of the article: >> Blaze is certainly more tuned for performance and uses nefty techniques under the hood like padding, explicit loop-unrolling and turning divisions to multiplications to create more opportunities for FMA. However, aggressively tuning for performance implies more specialisations, more overloads, more “SFINAE” and so on and as result compiles slower than Eigen.
- singhrac 5y agoI see, good point. I’m not convinced by this summary of the benchmark; N is too small, and they ignore the fact that views are much slower in Blaze than the others. To be clear, I think it’s great to have multiple competitive C++ implementations out there.
- bayindirh 5y agoIn my understanding, Eigen uses its internal routines unless you point it to external BLAS/LAPACK libraries[0]? Eigen's internal structures and features doesn't map well to traditional BLAS/LAPACK structures anyway. [0]: https://eigen.tuxfamily.org/dox/TopicUsingBlasLapack.html https://eigen.tuxfamily.org/dox/TopicUsingBlasLapack.html
- go_elmo 5y agoMy bad, should have looked it up before posting, thanks! afaik, LAPACK is highly architecture-adapted / optimized, so it makes sense to "decouple" the two, leaving it to the user to use it for highly performance critical binaries.
- bayindirh 5y agoYou're welcome, no problem; we're just discussing here. BLAS/LAPACK is very optimized and it's recommended to compile on (or for) target for best performance, however they're developed for a very long time, and somewhat old-fashioned in terms of ergonomics and internal flow. OTOH, Eigen is very modern, very easy to optimize (just pass -O3, and relevant -march -mtune to gcc), and you're screaming at 98% speed of BLAS/LAPACK. I've used it extensively in my Ph.D., and TensorFlow is also using Eigen. It's very easy and practical to use, and it's very very fast. It makes abusing (ehrm making full use of) your processor easy and strangely enjoyable. Some older benchmarks and current performance monitoring pages can be found at https://eigen.tuxfamily.org/index.php?title=Benchmark https://eigen.tuxfamily.org/index.php?title=Benchmark