neoforged / Bus

Event firing and listening framework, based on the event bus concept
GNU Lesser General Public License v2.1
3 stars 8 forks source link

Improve no-ASM performance #14

Closed Technici4n closed 11 months ago

Technici4n commented 11 months ago

New benchmark:

Benchmark                                              Mode  Cnt   Score    Error  Units
EventBusBenchmark.testClassLoaderCombined              avgt   15  84.617 ▒ 18.165  ns/op
EventBusBenchmark.testClassLoaderCombined:Àstack       avgt          NaN             ---
EventBusBenchmark.testClassLoaderDynamic               avgt   15  32.792 ▒  8.370  ns/op
EventBusBenchmark.testClassLoaderDynamic:Àstack        avgt          NaN             ---
EventBusBenchmark.testClassLoaderLambda                avgt   15  34.561 ▒  9.503  ns/op
EventBusBenchmark.testClassLoaderLambda:Àstack         avgt          NaN             ---
EventBusBenchmark.testClassLoaderStatic                avgt   15  31.085 ▒  7.756  ns/op
EventBusBenchmark.testClassLoaderStatic:Àstack         avgt          NaN             ---
EventBusBenchmark.testModLauncherCombined              avgt   15  77.762 ▒ 16.132  ns/op
EventBusBenchmark.testModLauncherCombined:Àstack       avgt          NaN             ---
EventBusBenchmark.testModLauncherDynamic               avgt   15  32.783 ▒  7.823  ns/op
EventBusBenchmark.testModLauncherDynamic:Àstack        avgt          NaN             ---
EventBusBenchmark.testModLauncherLambda                avgt   15  36.079 ▒  8.600  ns/op
EventBusBenchmark.testModLauncherLambda:Àstack         avgt          NaN             ---
EventBusBenchmark.testModLauncherStatic                avgt   15  30.572 ▒  7.573  ns/op
EventBusBenchmark.testModLauncherStatic:Àstack         avgt          NaN             ---
EventBusBenchmarkNoLoader.testNoLoaderCombined         avgt   15  88.453 ▒  6.768  ns/op
EventBusBenchmarkNoLoader.testNoLoaderCombined:Àstack  avgt          NaN             ---
EventBusBenchmarkNoLoader.testNoLoaderDynamic          avgt   15  40.793 ▒  3.335  ns/op
EventBusBenchmarkNoLoader.testNoLoaderDynamic:Àstack   avgt          NaN             ---
EventBusBenchmarkNoLoader.testNoLoaderLambda           avgt   15  43.646 ▒  5.980  ns/op
EventBusBenchmarkNoLoader.testNoLoaderLambda:Àstack    avgt          NaN             ---
EventBusBenchmarkNoLoader.testNoLoaderStatic           avgt   15  38.414 ▒  3.822  ns/op
EventBusBenchmarkNoLoader.testNoLoaderStatic:Àstack    avgt          NaN             ---

This shows that the ASM subclass transformer doesn't meaningfully change the performance numbers.