Skip to content

Instantly share code, notes, and snippets.

@vrurg
Created May 20, 2022 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrurg/29df9c1ce39f3c267df415b1b41f4291 to your computer and use it in GitHub Desktop.
Save vrurg/29df9c1ce39f3c267df415b1b41f4291 to your computer and use it in GitHub Desktop.
use Test;
my $v = 0;
my $st = now;
for ^100000 {
$v++;
}
my $et = now;
diag "Test time: " ~ ($et - $st);
@vrurg
Copy link
Author

vrurg commented May 20, 2022

$ time raku timing-test.raku
# Test time: 0.015716774

________________________________________________________
Executed in  499.56 millis    fish           external
   usr time  473.42 millis    0.11 millis  473.31 millis
   sys time   63.83 millis    1.81 millis   62.02 millis

@vrurg
Copy link
Author

vrurg commented May 20, 2022

Modified version to report module loading time:

my $st0 = BEGIN now;
use Test;

my $v = 0;
my $st = now;
for ^100000 {
    $v++;
}
my $et = now;
diag "Test time: " ~ ($et - $st);
diag "Module loading: " ~ ($st - $st0);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment