Hmm, are you sure you want 256x1024**2 in that substr? I think this is increasing the number beyond what you intended , which doesn't matter with substr because you're replacing all that trailing string with one char, but does matter with vec because nothing is cut-off
Adjusted for my machine I run
A perl -e"$x=chr(0);$x x=5*1024**2; <>;$r=\substr($x, 2*1024**2); <>;vec($$r,2*1024**2-1,1)=1; <>"
B perl -e"$x=chr(0);$x x=5*1024**2; <>;$r=\substr($x, 2*1024**2); <>;substr($$r,2*1024**2-1,1)='x'; <>"
And I consistently get results like
| A | B |
7,760 k
7,776 k
10,876 k
| 7,760 k
7,776 k
10,880 k |
| [reply] [d/l] [select] |
Grr. That'll teach me to try reduce my testcase to a one-liner :(
This 256x1024**2 was intended to be 256*1024**2. Surprisingly (or not) neither strict nor warnings catch the typo.
And when corrected the dynamics of the bug change substantially.
Thanks for calling me on it. Back to the drawing board!
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
| [reply] [d/l] [select] |
| [reply] |