Quick actions

cmd+k|ctrl+k

Navigation

Languages

meth_vs_colon

Snippet info

Language

Raku

Visibility

public

Author

221a86612c7785cb6094f25b034cba9994736288

Created

2025-01-07T16:35:46.497235Z

Updated

2025-01-07T17:04:16.248366Z

say $*KERNEL;
say $*DISTRO;
say $*VM;

my $n = 1_000_000;

my @a;
my $t = now;
for ^$n {@a.push($_)};
say "{@a.elems} Method: {now - $t}";

my @b;
$t = now; 
for ^$n {@b.push:$_}; 
say "{@b.elems} Colon no space: {now - $t}";

my @c;
$t = now; 
for ^$n {@c.push: $_}; 
say "{@c.elems} Colon space: {now - $t}";
INFO