Skip to content
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

make the export work much faster #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbinary
Copy link

@jbinary jbinary commented Apr 23, 2024

functions that are wrapped into @unwrap are used very intensively and are quite slow because they use introspection at each single call. this commit improves it by a lot by introspecting the function signature at the moment of wrapping and then reusing this information to avoid evaluating it over and over again improving the performance

On my machine it reduces CPU time by almost 2x:

before:

real    0m52.974s
user    0m31.621s
sys     0m0.846s

after:

real    0m35.633s
user    0m16.681s
sys     0m0.793s

functions that are wrapped into `@unwrap` are used very intensively and
are quite slow because they use introspection at each single call. this
commit improves it by a lot by introspecting the function signature at
the moment of wrapping and then reusing this information to avoid
evaluating it over and over again improving the performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant