Standard D, Mir D benchmarks against Numpy (BLAS)
9il
ilyayaroshenko at gmail.com
Thu Mar 12 13:47:02 UTC 2020
On Thursday, 12 March 2020 at 12:59:41 UTC, Pavel Shkadzko wrote:
> I have done several benchmarks against Numpy for various 2D
> matrix operations. The purpose was mere curiosity and spread
> the word about Mir D library among the office data engineers.
> Since I am not a D expert, I would be happy if someone could
> take a second look and double check.
>
> https://github.com/tastyminerals/mir_benchmarks
>
> Compile and run the project via: dub run --compiler=ldc
> --build=release
>
> *Table descriptions reduced to fit into post width.
>
> +---------------------------------+---------------------+--------------------+---------------------+
> | Description | Numpy (BLAS) (sec.) |
> Standard D (sec.) | Mir D (sec.) |
> +---------------------------------+---------------------+--------------------+---------------------+
> | sum of two 250x200 (50 loops) | 0.00115 |
> 0.00400213(x3.5) | 0.00014372(x1/8) |
> | mult of two 250x200 (50 loops) | 0.0011578 |
> 0.0132323(x11.4) | 0.00013852(x1/8.3) |
> | sum of two 500x600 (50 loops) | 0.0101275 |
> 0.016496(x1.6) | 0.00021556(x1/47) |
> | mult of two 500x600 (50 loops) | 0.010182 |
> 0.06857(x6.7) | 0.00021717(x1/47) |
> | sum of two 1k x 1k (50 loops) | 0.0493201 |
> 0.0614544(x1.3) | 0.000422135(x1/117) |
> | mult of two 1k x 1k (50 loops) | 0.0493693 |
> 0.233827(x4.7) | 0.000453535(x1/109) |
> | Scalar product of two 30k | 0.0152186 |
> 0.0227465(x1.5) | 0.0198812(x1.3) |
> | Dot product of 5k x 6k, 6k x 5k | 1.6084685 |
> -------------- | 2.03398(x1.2) |
> | L2 norm of 5k x 6k | 0.0072423 |
> 0.0160546(x2.2) | 0.0110136(x1.6) |
> | Quicksort of 5k x 6k | 2.6516816 |
> 0.178071(x1/14.8) | 1.52406(x1/0.6) |
> +---------------------------------+---------------------+--------------------+---------------------+
Haha
More information about the Digitalmars-d
mailing list