Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Primes software drag race

by dkechag (Acolyte)
on May 24, 2021 at 12:26 UTC ( [id://11132958]=perlmeditation: print w/replies, xml ) Need Help??

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 (Parson) 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";'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://11132958]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-24 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found