Skip to content

Potential performance bug on SCOPED handlers #13

@teofr

Description

@teofr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions