The final installment in the series:
"The-Quest-For-Performance" from my blog Killing It with #perl
Discussing #python #numpy #numba, #rstats #openMP enhancements of Perl code and #simd
Bottom line: I will not be migrating to Python anytime soon.
Food for thought: The Perl interpreter (and many of the modules) are deep down massive C programs. Perhaps one can squeeze real performance kicks by looking into alternative compilers, compiler flags and pragmas ?
submitted by /u/ReplacementSlight413
[link] [comments]
The Quest for Performance Part IV : May the SIMD Force be with you
At this point one may wonder how numba, the Python compiler around numpy Python code, delivers a performance premium over numpy.Killing-It-with-PERL
A couple of data/compute intensive examples using Perl Data Language (#PDL), #OpenMP, #Perl, Inline and #Python (base, #numpy, #numba). Kind of interesting to see Python eat Perl's dust and PDL being equal to numpy.
OpenMP and Perl's multithreaded #PDL array language were the clear winners here.
submitted by /u/ReplacementSlight413
[link] [comments]
The Quest for Performance Part I : Inline C, OpenMP and PDL
Sometimes, one’s code must simply perform and principles, such as aeasthetics, “cleverness” or commitment to a single language solution simply go out of the window.Killing-It-with-PERL
Lessons learned: A) Performance freaks to stop using #rstat 's runif for random generation. The Hoshiro random number generator https://arxiv.org/abs/1805.01407 is 10x faster. Implementations in #perl 's #PDL, #rstats (dqrng) and #python #numpy are within 20% of each other B) But does it make a difference in applications? To get to the bottom of this, I coded a truncated random variate generator in #rstats and #perl using #pdl (as well as standard u/perl) using the #GSL packages https://metacpan.org/pod/PDL::GSL::CDF & https://metacpan.org/pod/Math::GSL for accessing the CDF & quantile functions. In this context, it's the calculation of the #CDF that is the computationally intensive part, not the drawing of the random number itself. C) I should probably blog about these experiments at some point. Note that #pdl (but not base #perl) are rather competitive choices for large array processing with numerical operations. I mostly stay away of #python , but would not surprise me that for compute intensive stuff (where the heavy duty work is done in C/C++), it does not matter (much) which high level language one uses to build data applications submitted by /u/ReplacementSlight413 |
mstdn.science
http://mstdn.science is a place for people our field (microbiology), scientists in general, and science enthusiasts to discuss research and topics surrounding our work.Mastodon hosted on mstdn.science
Programming Feed reshared this.