I reasoned that 3 times that gives 48M in 1.5GB. Then replace the ints with the pointers and add 48mx20 (rounded up to 24) = 1.01GB for the strings themselves. gives 2.5GB total; and around 60 seconds to shuffle. Did I miss something?
Yes: an int is stored entirely within an SV head, whereas a string needs an SV body too, as well as the string itself (which may also have some malloc overhead).
I used the following code to get my estimate:
my $max = 10_000_000;
my @a;
system "ps -flyp $$";
$a[$max] = 0; # pre-extend array
$a[$_] = '4.90032E-8,1.25327E-7' for 0..$max;
system "ps -flyp $$";
Dave.