Live data from Hacker News

Benchmarks for Blaze, A high-performance C++ math library

code.google.com

11–20 of 34 posts

Re: Benchmarks for Blaze, A high-performance C++ math library

#11
post #7

In the first plot, why do all libraries slow down at the n=1000 mark? something to do with cache?

I'm guessing that's the point at which the working set exceeds the L1 cache size. You can see a few more subtle dips in the performance graph at later points; these correspond to working set spilling out of the L2 and L3 caches.

Re: Benchmarks for Blaze, A high-performance C++ math library

#15
post #10

I've had great success with Blaze, despite the fact that it has received little publicity compared to alternatives like Eigen, Armadillo, etc. Blaze is consistently the leader of the pack in benchmarks, and even outperforms Intel MKL on the Xeon E5-2660 (the CPU for which the benchmark results are shown).

For what problems? General statements like this are hard to back up, especially in the wild world of numerical linear algebra. From my experience, there are currently no good distributed-memory open source sparse-direct solvers. No good distributed-memory ILU implementation, either. Scalability is almost non-existant beyond 100 cores.

That's because direct solvers can't scale. If you want to solve a large (distributed over hundreds of nodes) sparse linear algebra problem as fast as possible, decades of research have been poured into efficient techniques (Krylov methods, Multigrid, preconditioners) for solving them iteratively.

Re: Benchmarks for Blaze, A high-performance C++ math library

#16

better link: https://bitbucket.org/blaze-lib/blaze

Thanks, I tried finding the link to the Bitbucket repository but I had a hard time finding the link via Google.

It actually took me more than a few minutes as well, had to use BitBucket's search since Google (rarely enough) was returning crap

Re: Benchmarks for Blaze, A high-performance C++ math library

#17
post #10

I've had great success with Blaze, despite the fact that it has received little publicity compared to alternatives like Eigen, Armadillo, etc. Blaze is consistently the leader of the pack in benchmarks, and even outperforms Intel MKL on the Xeon E5-2660 (the CPU for which the benchmark results are shown).

For what problems? General statements like this are hard to back up, especially in the wild world of numerical linear algebra. From my experience, there are currently no good distributed-memory open source sparse-direct solvers. No good distributed-memory ILU implementation, either. Scalability is almost non-existant beyond 100 cores.

I've used Blaze for machine learning applications, where I've relied on the performance of elementwise operations and dense matrix multiplication on a single machine (the results advertised in the benchmark). Eigen has more functionality, but in my experience is not always optimized as well as Blaze. Neither has support for distributed computing, but I believe this is a problem that HPX is trying to address: https://github.com/STEllAR-GROUP/hpx

Re: Benchmarks for Blaze, A high-performance C++ math library

#18

I am considering converting a C++03 math library to C++14 as a side project to learn C++14 and I examined Eigen and Blaze. Eigen's code size seems to be a fraction of Blaze, even though their functionalities are similar. Eigen also has some design documents while Blaze has papers but not much more. It seems I will try my hands on Eigen library for now. It is amazing that a couple of people could do in a few years; Bl…

I agree with Arcanus; lines of code isn't a good measurement here. It's not uncommon for high performance math and science libraries to have specialized code to handle a lot of different cases the fastest way possible, or the most accurate way possible, etc. and some libraries are even able to switch between them heuristically based on the data they're being used on.

A common example is matrix multiply. For smaller matrices it's faster to use naive O(n^3) multiply because of the large constant factor with Strassen's algorithm. At some point n^3 will dominate the constant factor, and Strassen's becomes better. To get the best performance in all cases, both algorithms need to be implemented, which increases the code size.

Re: Benchmarks for Blaze, A high-performance C++ math library

#19
post #8

I am considering converting a C++03 math library to C++14 as a side project to learn C++14 and I examined Eigen and Blaze. Eigen's code size seems to be a fraction of Blaze, even though their functionalities are similar. Eigen also has some design documents while Blaze has papers but not much more. It seems I will try my hands on Eigen library for now. It is amazing that a couple of people could do in a few years; Bl…

Eigen is header only and heavily templated, which certainly keeps the source down. However, SLOC is a poor metric for the quality of a codebase, especially scientific ones. I've certainly found many instances where longer line counts are more performant, for instance with hand-unrolling loops ( very rare edge case, not suggesting doing this as a rule!). Unless you intend to become involved in development of the libra…

I'd say lines of code does matter if the set of functionality is the same, i'd wager that, if you have the same functionality in less lines of code, generally it's easier to verify that it's correct + avoid daft bugs.

.. Unless it's written in a completely uncomprehensible way of course (such as some meta c++ stuff), but in languages with good metaprogramming.

Re: Benchmarks for Blaze, A high-performance C++ math library

#20
post #15
post #10

Earlier quoted context omitted.

For what problems? General statements like this are hard to back up, especially in the wild world of numerical linear algebra. From my experience, there are currently no good distributed-memory open source sparse-direct solvers. No good distributed-memory ILU implementation, either. Scalability is almost non-existant beyond 100 cores.

That's because direct solvers can't scale. If you want to solve a large (distributed over hundreds of nodes) sparse linear algebra problem as fast as possible, decades of research have been poured into efficient techniques (Krylov methods, Multigrid, preconditioners) for solving them iteratively.

[deleted]
Post reply on HN