# Pastebin R7Iep6j9 $ perl6 -e 'm: class InternStr is Str {method new(Str \str) {state %s; %s{str} //= InternStr.bless: :value(str)}}; multi infix:(InternStr \a, InternStr \b) {a === b}; my $a = InternStr.new: "foo" x 99999; my $b = InternStr.new: ("f" ~ ("o" x 2)) x 99999; my $start = now; $ = $a eq $b for ^10000; say now - $start; my $c = "foo" x 99999; my $d = "foo" x 99999; $start = now; $ = $c eq $d for ^10000; say now - $start' 0.0087804 12.49798658