ALGLIB+MKL: first results

In November (2013) we presented new product - ALGLIB 3.8.1 (Commercial Edition), the first ALGLIB version which was shipped with Intel MKL - high-performance numerical library by Intel. It was first release which featured C# interface to native computational core, thus both C++ and C# users were able to use MKL as part of ALGLIB.

ALGLIB uses MKL to accelerate linear algebra - and other functionality, which depends on linear algebra. Most important linear algebra functions are already accelerated - and even more will be powered by MKL in the upcoming releases. Unlike many other commercial packages, we use MKL only as accelerator. We always have our own "backup" linear algebra code which can be used when MKL is not an option (say, in 100% .NET environment).

MKL-capable version of ALGLIB was created in technical partnership with Intel Numerics Russia. During development we received help and important suggestions from Intel developers, especially Gennady Fedorov and Sergey Maidanov. The whole idea of ALGLIB+MKL combination was inspired by Intel software team! So, this note is a good place to thank them :)

After 4 months with new release we can say that it was favorably received by commercial users. C++ users reported significant increase in performance, but most striking reports were from C# users - moving from 100% managed computational core to highly optimized native one makes a big difference.

Chart above summarizes differences in performance (measured on 6-core x64 system, with 5 cores out of 6 being used for testing). We tested three computational cores: managed core, native core (ALGLIB), ALGLIB+MKL (ALGLIB core accelerated by MKL). Two kinds of test problems were solved: matrix-matrix products (DGEMM) and calculation of the distance matrix for clustering problem, which heavily depends on DGEMM.

You may see that MKL gives great performance boost even to ALGLIB's native core (about 2x). But when performance is compared with that of NET computational core, difference can be as large as 5x. The conclusion is: if you want to have best performance on x64, MKL is a way to go!

This article is licensed for personal use only.

Download ALGLIB for C++ / C# / ...

ALGLIB Project offers you two editions of ALGLIB:

ALGLIB Free Edition:
delivered for free
offers full set of numerical functionality
extensive algorithmic optimizations
no low level optimizations
non-commercial license

ALGLIB Commercial Edition:
flexible pricing
offers full set of numerical functionality
extensive algorithmic optimizations
high performance (SMP, SIMD)
commercial license with support plan

Links to download sections for Free and Commercial editions can be found below:

ALGLIB 3.12.0 for C++

C++ library.
Delivered with sources.
Monolithic design.
Extreme portability.
Editions:   FREE   COMMERCIAL

ALGLIB 3.12.0 for C#

C# library with native kernels.
Delivered with sources.
VB.NET and IronPython wrappers.
Extreme portability.
Editions:   FREE   COMMERCIAL

ALGLIB 3.12.0 for Delphi

Delphi wrapper around C core.
Delivered as precompiled binary.
Compatible with FreePascal.
Editions:   FREE   COMMERCIAL

ALGLIB 3.12.0 for CPython

CPython wrapper around C core.
Delivered as precompiled binary.
Editions:   FREE   COMMERCIAL