Skip to content

Commit

Permalink
Update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
P3ridot committed Apr 1, 2024
1 parent 87270cd commit 267c9ba
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,24 @@
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;

/* JDK17 (I5-8600K OC 4.5 Ghz, 32GB RAM 3200Mhz, Windows 10)
Benchmark Mode Cnt Score Error Units
InstanceConstructionBenchmark.direct thrpt 10 1789904.378 � 1122.822 ops/ms
InstanceConstructionBenchmark.injected thrpt 10 2629.149 � 66.627 ops/ms
InstanceConstructionBenchmark.injectedFast thrpt 10 2890.650 � 35.665 ops/ms
InstanceConstructionBenchmark.injectedStatic thrpt 10 2681.387 � 3.025 ops/ms
InstanceConstructionBenchmark.injectedStaticFast thrpt 10 2890.723 � 8.385 ops/ms
InstanceConstructionBenchmark.reflection thrpt 10 104444.640 � 88.579 ops/ms
/* JDK17 (R9-5900X, 32GB RAM 3200Mhz, Windows 11)
Benchmark Mode Cnt Score Error Units
InstanceConstructionBenchmark.direct thrpt 10 8660370.966 � 104379.534 ops/ms
InstanceConstructionBenchmark.generatedInjected thrpt 10 13621.451 � 37.353 ops/ms
InstanceConstructionBenchmark.generatedInjectedStatic thrpt 10 14021.858 � 180.536 ops/ms
InstanceConstructionBenchmark.injected thrpt 10 8321.647 � 187.627 ops/ms
InstanceConstructionBenchmark.injectedFast thrpt 10 8941.758 � 263.119 ops/ms
InstanceConstructionBenchmark.injectedStatic thrpt 10 8742.619 � 370.675 ops/ms
InstanceConstructionBenchmark.injectedStaticFast thrpt 10 9668.630 � 376.711 ops/ms
InstanceConstructionBenchmark.reflection thrpt 10 193259.892 � 671.292 ops/ms
*/
@Fork(value = 1)
@Warmup(iterations = 10, time = 2)
@Measurement(iterations = 10, time = 2)
@Threads(4)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public class InstanceConstructionBenchmark {

Expand All @@ -42,7 +46,7 @@ public Entity(int id, String name, EntityData data) {

}

private static class EntityData {
public static class EntityData {

private final int coins;
private final float health;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,23 @@
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
import org.panda_lang.utilities.inject.annotations.Inject;

/* JDK17 (I5-8600K OC 4.5 Ghz, 32GB RAM 3200Mhz, Windows 10)
Benchmark Mode Cnt Score Error Units
InstanceConstructionWithFieldsBenchmark.direct thrpt 10 1784219.4697246.175 ops/ms
InstanceConstructionWithFieldsBenchmark.injected thrpt 10 1508.04810.094 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedFast thrpt 10 2540.25511.664 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedStatic thrpt 10 2139.46115.704 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedStaticFast thrpt 10 3807.76919.776 ops/ms
InstanceConstructionWithFieldsBenchmark.reflection thrpt 10 21433.17328.671 ops/ms
/* JDK17 (R9-5900X, 32GB RAM 3200Mhz, Windows 11)
Benchmark Mode Cnt Score Error Units
InstanceConstructionWithFieldsBenchmark.direct thrpt 10 8568409.47356063.080 ops/ms
InstanceConstructionWithFieldsBenchmark.injected thrpt 10 8734.063132.188 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedFast thrpt 10 10741.429337.507 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedStatic thrpt 10 8002.083540.164 ops/ms
InstanceConstructionWithFieldsBenchmark.injectedStaticFast thrpt 10 10337.340404.279 ops/ms
InstanceConstructionWithFieldsBenchmark.reflection thrpt 10 28319.446555.004 ops/ms
*/
@Fork(value = 1)
@Warmup(iterations = 10, time = 2)
@Measurement(iterations = 10, time = 2)
@Threads(4)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public class InstanceConstructionWithFieldsBenchmark {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
import panda.utilities.ReflectionUtils;

/* JDK17 (I5-8600K OC 4.5 Ghz, 32GB RAM 3200Mhz, Windows 10)
/* JDK17 (R9-5900X, 32GB RAM 3200Mhz, Windows 11)
Benchmark Mode Cnt Score Error Units
InvokeMethodBenchmark.direct thrpt 10 492235.407 988.297 ops/ms
InvokeMethodBenchmark.generatedInjected thrpt 10 432266.343 737.527 ops/ms
InvokeMethodBenchmark.injected thrpt 10 142187.855 502.770 ops/ms
InvokeMethodBenchmark.reflection thrpt 10 189730.28222464.101 ops/ms
InvokeMethodBenchmark.direct thrpt 10 868064.0942086.213 ops/ms
InvokeMethodBenchmark.generatedInjected thrpt 10 864293.98313610.569 ops/ms
InvokeMethodBenchmark.injected thrpt 10 857157.77822008.580 ops/ms
InvokeMethodBenchmark.reflection thrpt 10 434325.439 1554.849 ops/ms
*/
@Fork(value = 1)
@Warmup(iterations = 10, time = 2)
@Measurement(iterations = 10, time = 2)
@Threads(4)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public class InvokeMethodBenchmark {

Expand Down

0 comments on commit 267c9ba

Please sign in to comment.