Skip to content

Instantly share code, notes, and snippets.

@jnthn

jnthn/head.raku Secret

Created April 14, 2021 10:47
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 jnthn/d88bf1561e85aaac1fa20e56d9346364 to your computer and use it in GitHub Desktop.
Save jnthn/d88bf1561e85aaac1fa20e56d9346364 to your computer and use it in GitHub Desktop.
multi m(Int) { }
multi m(Str) { }
for ^1_000_000 {
m(1);
m("x");
}
say now - INIT now;
use nqp;
multi m(Int) { }
multi m(Str) { }
for ^1_000_000 {
nqp::dispatch('raku-call', &m, 1);
nqp::dispatch('raku-call', &m, "x");
}
say now - INIT now;
jnthn@homedev:~/dev/rakudo$ MVM_SPESH_DISABLE=1 ./rakudo-m basic-multi-head.raku
0.46298199
jnthn@homedev:~/dev/rakudo$ MVM_SPESH_DISABLE=1 RAKUDO_NEW_DISP=1 ./rakudo-m basic-multi-new-disp.raku
0.332425902
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment