Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Strawberry: Both IO and global match are VERY SLOW. Unless pre-heated (but why?)

by Discipulus (Canon)
on Nov 14, 2023 at 08:47 UTC ( [id://11155616] : note . print w/replies, xml ) Need Help??


in reply to Strawberry: Both IO and global match are VERY SLOW. Unless pre-heated (but why?)

Hello dear Anonymous Monk,

it took a while, but there are strange facts to notice:

  • v5.12.3 is not affected by pre-heat and it is ~4x faster then others.
  • v5.20.3 v5.22.3 and v5.24.2 are not affected by pre-heat
  • v5.28.0 is ~4x faster without pre-heat (but v5.28.1 no ;)

# removed 5.26.0 at the top of list because already present | v5.12.3 | Array size: 500000 | split, no pre-heat: 0.837 | split, pre-heat: 0.851 | match, no pre-heat: 0.549 | match, pre-heat: 0.562 | io(list), no pre-heat: 0.462 | io(list), pre-heat: 0.427 | Array size: 1000000 | split, no pre-heat: 2.037 | split, pre-heat: 1.967 | match, no pre-heat: 1.362 | match, pre-heat: 1.380 | io(list), no pre-heat: 1.132 | io(list), pre-heat: 1.158 | Array size: 5000000 | split, no pre-heat: 23.066 | split, pre-heat: 23.281 | match, no pre-heat: 20.987 | match, pre-heat: 20.879 | io(list), no pre-heat: 19.961 | io(list), pre-heat: 19.297 [OK] \perl5.12-32bit\perl\bin\perl.exe | v5.20.3 | Array size: 500000 | split, no pre-heat: 1.088 | split, pre-heat: 1.106 | match, no pre-heat: 0.917 | match, pre-heat: 0.913 | io(list), no pre-heat: 0.832 | io(list), pre-heat: 0.834 | Array size: 1000000 | split, no pre-heat: 3.466 | split, pre-heat: 3.496 | match, no pre-heat: 3.099 | match, pre-heat: 3.058 | io(list), no pre-heat: 3.067 | io(list), pre-heat: 3.469 | Array size: 5000000 | split, no pre-heat: 74.205 | split, pre-heat: 76.273 | match, no pre-heat: 75.415 | match, pre-heat: 73.660 | io(list), no pre-heat: 75.609 | io(list), pre-heat: 75.151 [OK] \perl5.20.64bit\perl\bin\perl.exe | v5.22.3 | Array size: 500000 | split, no pre-heat: 0.386 | split, pre-heat: 0.443 | match, no pre-heat: 0.862 | match, pre-heat: 0.802 | io(list), no pre-heat: 0.793 | io(list), pre-heat: 0.797 | Array size: 1000000 | split, no pre-heat: 0.782 | split, pre-heat: 0.800 | match, no pre-heat: 3.007 | match, pre-heat: 3.173 | io(list), no pre-heat: 3.049 | io(list), pre-heat: 3.077 | Array size: 5000000 | split, no pre-heat: 3.931 | split, pre-heat: 4.047 | match, no pre-heat: 72.992 | match, pre-heat: 81.416 | io(list), no pre-heat: 76.030 | io(list), pre-heat: 76.570 [OK] perl5.22.64bit\perl\bin\perl.exe | v5.24.2 | Array size: 500000 | split, no pre-heat: 0.387 | split, pre-heat: 0.383 | match, no pre-heat: 0.901 | match, pre-heat: 0.953 | io(list), no pre-heat: 0.934 | io(list), pre-heat: 1.038 | Array size: 1000000 | split, no pre-heat: 0.771 | split, pre-heat: 0.817 | match, no pre-heat: 3.739 | match, pre-heat: 3.195 | io(list), no pre-heat: 3.371 | io(list), pre-heat: 3.647 | Array size: 5000000 | split, no pre-heat: 3.854 | split, pre-heat: 3.880 | match, no pre-heat: 76.768 | match, pre-heat: 81.458 | io(list), no pre-heat: 83.648 | io(list), pre-heat: 83.204 [OK] perl5.24.64bit\perl\bin\perl.exe | v5.26.0 | Array size: 500000 | split, no pre-heat: 0.426 | split, pre-heat: 0.389 | match, no pre-heat: 0.878 | match, pre-heat: 0.202 | io(list), no pre-heat: 0.883 | io(list), pre-heat: 0.178 | Array size: 1000000 | split, no pre-heat: 0.816 | split, pre-heat: 0.838 | match, no pre-heat: 3.246 | match, pre-heat: 0.391 | io(list), no pre-heat: 3.038 | io(list), pre-heat: 0.382 | Array size: 5000000 | split, no pre-heat: 3.879 | split, pre-heat: 3.904 | match, no pre-heat: 72.029 | match, pre-heat: 1.882 | io(list), no pre-heat: 72.251 | io(list), pre-heat: 1.843 [OK] \perl5.26.64bit\perl\bin\perl.exe | v5.26.2 | Array size: 500000 | split, no pre-heat: 0.380 | split, pre-heat: 0.404 | match, no pre-heat: 0.824 | match, pre-heat: 0.216 | io(list), no pre-heat: 0.780 | io(list), pre-heat: 0.183 | Array size: 1000000 | split, no pre-heat: 0.782 | split, pre-heat: 0.797 | match, no pre-heat: 3.217 | match, pre-heat: 0.437 | io(list), no pre-heat: 3.294 | io(list), pre-heat: 0.401 | Array size: 5000000 | split, no pre-heat: 4.139 | split, pre-heat: 4.152 | match, no pre-heat: 83.296 | match, pre-heat: 2.216 | io(list), no pre-heat: 84.700 | io(list), pre-heat: 1.997 [OK] \perl-5.26.64bit-PDL\perl\bin\perl.exe | v5.28.0 | Array size: 500000 | split, no pre-heat: 0.408 | split, pre-heat: 0.418 | match, no pre-heat: 0.312 | match, pre-heat: 0.193 | io(list), no pre-heat: 0.286 | io(list), pre-heat: 0.169 | Array size: 1000000 | split, no pre-heat: 0.832 | split, pre-heat: 0.884 | match, no pre-heat: 1.113 | match, pre-heat: 0.420 | io(list), no pre-heat: 0.950 | io(list), pre-heat: 0.385 | Array size: 5000000 | split, no pre-heat: 4.599 | split, pre-heat: 4.683 | match, no pre-heat: 20.415 | match, pre-heat: 2.069 | io(list), no pre-heat: 20.736 | io(list), pre-heat: 1.855 [OK] \perl5.28.32bit\perl\bin\perl.exe | v5.28.1 | Array size: 500000 | split, no pre-heat: 0.379 | split, pre-heat: 0.388 | match, no pre-heat: 0.860 | match, pre-heat: 0.201 | io(list), no pre-heat: 0.814 | io(list), pre-heat: 0.167 | Array size: 1000000 | split, no pre-heat: 0.762 | split, pre-heat: 0.785 | match, no pre-heat: 3.113 | match, pre-heat: 0.415 | io(list), no pre-heat: 3.152 | io(list), pre-heat: 0.340 | Array size: 5000000 | split, no pre-heat: 4.033 | split, pre-heat: 4.285 | match, no pre-heat: 78.298 | match, pre-heat: 2.105 | io(list), no pre-heat: 79.609 | io(list), pre-heat: 1.726 [OK] \perl5.28-64bit\perl\bin\perl.exe | v5.32.0 | Array size: 500000 | split, no pre-heat: 0.424 | split, pre-heat: 0.486 | match, no pre-heat: 0.881 | match, pre-heat: 0.240 | io(list), no pre-heat: 0.845 | io(list), pre-heat: 0.193 | Array size: 1000000 | split, no pre-heat: 0.833 | split, pre-heat: 0.932 | match, no pre-heat: 3.086 | match, pre-heat: 0.427 | io(list), no pre-heat: 3.080 | io(list), pre-heat: 0.416 | Array size: 5000000 | split, no pre-heat: 4.586 | split, pre-heat: 4.738 | match, no pre-heat: 79.045 | match, pre-heat: 2.068 | io(list), no pre-heat: 79.037 | io(list), pre-heat: 2.089 [OK] \perl5.32.64bit\perl\bin\perl.exe

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.