Skip to content

Bytecode rewriting for reduced event dispatching overhead - #14284

Draft
SirYwell wants to merge 3 commits into
PaperMC:mainfrom
SirYwell:perf/event-calling
Draft

SirYwell wants to merge 3 commits into
PaperMC:mainfrom
SirYwell:perf/event-calling

Conversation

@SirYwell

Copy link
Copy Markdown
Contributor

Draft because there are many moving parts here. Comments and feedback are welcome though.

See #14153, especially #14153 (comment).

The bytecode rewriting/gradle integration is probably problematic regarding caching.

The current micro benchmark shows the following numbers on my machine:

Benchmark                                  (hasListener)  Mode  Cnt  Score   Error  Units
EventBenchmarks.callNormal                          true  avgt    6  6.507 ± 0.345  ns/op
EventBenchmarks.callNormal                         false  avgt    6  0.124 ± 0.010  ns/op
EventBenchmarks.hasListenersIndy                    true  avgt    6  0.496 ± 0.030  ns/op
EventBenchmarks.hasListenersIndy                   false  avgt    6  0.495 ± 0.038  ns/op
EventBenchmarks.registeredListenersLength           true  avgt    6  0.626 ± 0.027  ns/op
EventBenchmarks.registeredListenersLength          false  avgt    6  0.613 ± 0.024  ns/op

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

1 participant