in reply to Re^3: Risque Romantic Rosetta Roman Race - Tried Array Lookup
in thread Risque Romantic Rosetta Roman Race

Would

unpack 'c*', uc($_)
run faster than
map ord, split //, uc($_)
?

Replies are listed 'Best First'.
Re^5: Risque Romantic Rosetta Roman Race - Testing Unpack
by marioroy (Prior) on May 12, 2023 at 18:24 UTC

    Thanks, tybalt89. Yes, it runs faster :) completing in less than 0.2 seconds. I updated the MCE demonstration.

    # captured UNIX time C++ 1.0 : 0.450s C++ fast_io : 0.291s Perl MCE 64 thds : 0.252s # after tweaks: CPU affinity and slurp IO Perl MCE 64 thds : 0.218s # more tweaks: using an ARRAY and unpack Perl MCE 64 thds : 0.192s $ time perl rtoa-pgatram-mce.pl t1.txt >mce.tmp rtoa pgatram start time 0.165 secs real 0m0.192s user 0m7.596s sys 0m0.420s