-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark results #2
Comments
@tobyink Thanks for the early review and feedback! I am delighted that I'm not the only one following metacpan/recent :) .
|
OK - I was able to run the benchmark thanks to When I change the
Edit Of course, SMT's dispatcher is much less sophisticated than Kavorka's, and that is probably part of the speed. This tells me that, as SMT grows, it would be worth using dispatchers specific to the set of implementations for each function. Modified source
|
Hmm, wow, that's weird. For one parameter, SMT is way faster. For two, Kavorka is faster. |
I think I know why. Type::Params::multisig is smarter at dispatching; I need to steal some of that logic into Kavorka. |
Thanks for the pointer to |
Not really an issue, but thought I'd send you these.
Benchmark source
Results on my laptop:
I had expected a bit of a slow down from your use of guards and global variables, but it actually performs at a pretty decent rate.
As you use a stringy eval to build your dispatcher, you could probably speed things up a little by avoiding the hashtable arity lookup thing at run time, and putting
if(@_==1) {...} elsif(@_==2) {...}
into the evaluated string itself. The only advantage in keeping the hash table lookup would be if you wanted to be able to insert new entries into it at run-time, but right now the hash is a lexical variable, so short of some PadWalker tricks, can't be altered by runtime code anyway.The text was updated successfully, but these errors were encountered: