# New Ticket Created by Adrian Kreher # Please include the string: [perl #123974] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=123974 >
This is perl6 version 2015.02-157-g28fddba built on MoarVM version 2015.02-17-g86d0c68, running on Fedora 21 x64. (All memory usages gathered via maxresident from /usr/bin/time) Things that eat a lot of memory: /usr/bin/time perl6 -e'for 1 .. 1000 {my $a = "a" x 1_000_000; $a ~~ /./;}' 4010652maxresident /usr/bin/time perl6 -e'for 1 .. 1000 {my $a = "a" x 1_000_000; $a ~~ /z/;}' 3775768maxresident /usr/bin/time perl6 -e'my $a; my $i = 0; while $i < 1000 {$a = "a" x 1_000_000; $a ~~ /./; $i++};' 4011284maxresident For these cases, if I replace 1000 with 100, then I use right around 500MB in these cases. JVM does not appear to be affected or affected as badly, as I can ramp up 1000 to 10000 and still be around 1GB. Things that don't consume tons of memory: /usr/bin/time perl6 -e'my $a = "a" x 1_000_000; for 1 .. 1000 {$a ~~ /./;}' 106320maxresident /usr/bin/time perl6 -e'for 1 .. 1000 {my $a = "a" x 1_000_000; $a.chars}' 92552maxresident (Note that my real use case has distinct values since they are being read from a file with similar line-length characteristics.)