I have to disagree; that code will execute about 14 ops per character (or about 42000000000 ops total); even the overhead of perl's op dispatch loop will be huge, much less the actual code of the ops themselves. Simulating just the
basic overhead with
(3 ops per loop iteration) runs about 36 minutes on my system; this is substantially longer than it would take to read through 3Gb.