libhandler icon indicating copy to clipboard operation
libhandler copied to clipboard

Potential performance bug on SCOPED handlers

Open teofr opened this issue 2 years ago • 0 comments

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

teofr avatar Aug 24 '23 14:08 teofr