-
Notifications
You must be signed in to change notification settings - Fork 0
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
How much runtime overhead to advices induce? #2
Comments
I've added a very simple benchmark in dc58403. The benchmark uses the "identity advice" on a function with 4 parameters. Results with -O0:
Results with -O2:
It seems that, with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Putting the arguments into the
NP
and spreading them again isn't likely to be cheap. I should benchmark.The internals of
Advice
are hidden. Perhaps, if optimization were required,Advice
could become a sum type:Specialized constructor functions (beyond
makeArgsAdvice
andmakeExecutionAdvice
) should also be exported from the module.advise
andmappend
could pattern-match on the new constructors and adopt more efficient implementations when possible.The text was updated successfully, but these errors were encountered: