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

Potential performance bug on SCOPED handlers #13

Open
teofr opened this issue Aug 24, 2023 · 0 comments
Open

Potential performance bug on SCOPED handlers #13

teofr opened this issue Aug 24, 2023 · 0 comments

Comments

@teofr
Copy link

teofr commented Aug 24, 2023

After testing some use cases with different handlers op kind, I realized that LH_OP_SCOPED seems slower than LH_OP_GENERAL. I tried changing the handler kind on https://github.com/koka-lang/libhandler/blob/master/test/test-state.c#L57-L58 (and the corresponding resume function) and I see that it's considerably worse when using LH_OP_SCOPED. It's always likely that I'm doing something wrong, but these are the times I'm getting for an N=1000000:

  • LH_OP_TAIL_NOOP: 0.017538s
  • LH_OP_SCOPED: 5.653231s
  • LH_OP_GENERAL: 0.745435s
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

No branches or pull requests

1 participant