David Plummer, a former MS software engineer with a popular youtube channel, recently posted a video comparing C#/C++/Python performance with a Primes implementation. He uploaded the source code to a github repo and people started adding implementations for many other languages. There's a Perl implementation, although I haven't yet looked whether it can be improved on. I thought I'd post it since I found it interesting and thought somebody might welcome the challenge of making a faster Perl solution (or making a Raku solution).

Replies are listed 'Best First'.
Re: Primes software drag race (Mathematical References)
by eyepopslikeamosquito (Archbishop) on May 25, 2021 at 06:10 UTC
Re: Primes software drag race
by cavac (Prior) on Jun 01, 2021 at 08:53 UTC

    Uhm, this is Perl. If someone writes a faster version in some other programming language (most likely C/C++), there's a good chance we can just "Inline::C" it and keep staying near the top of the results ;-)

    SCNR: The biggest challenge is see here is finding the correct h2xs arguments to make it a proper dist with a precompiled library.

    perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'