MIR vs. Numpy
9il
ilyayaroshenko at gmail.com
Wed Nov 18 15:34:15 UTC 2020
On Wednesday, 18 November 2020 at 10:05:06 UTC, Tobias Schmidt
wrote:
> Dear all,
>
> to compare MIR and Numpy in the HPC context, we implemented a
> multigrid solver in Python using Numpy and in D using Mir and
> perforemd some benchmarks with them.
>
> You can find our code and results here:
> https://github.com/typohnebild/numpy-vs-mir
>
> Feedback is very welcome. Please feel free to open issues, pull
> requests or simply post your thoughts below.
>
> Kind regards,
> Tobias
Thank you a lot! It is a huge benefit for Mir and D to have so
quality benchmarks.
Python's sweep_3D access memory only once for one element
computation, while old D's sweep_slice access it 7 times.
A PR [1] for new version of sweep_slice was added, I expect it
will be at least twice faster. The new sweep_slice uses a more
D'sh approach and single memory access to the computation element.
[1] https://github.com/typohnebild/numpy-vs-mir/pull/1
Cheers,
Ilya
More information about the Digitalmars-d-announce
mailing list