Skip to content

Instantly share code, notes, and snippets.

View zaharidichev's full-sized avatar

Zahari Dichev zaharidichev

View GitHub Profile
@zaharidichev
zaharidichev / gist:0d57ed3dce39cfaf943d54296bbae9e2
Created May 29, 2017 13:17
Dispatcher-benchmark-varying-throughput
[info] # Run complete. Total time: 01:25:49
[info]
[info] Benchmark (dispatcher) (numActors) (threads) (throughput) Mode Cnt Score Error Units
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 1 thrpt 10 32756.157 ± 2997.516 ops/s
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 2 thrpt 10 33552.653 ± 2026.925 ops/s
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 8 thrpt 10 34137.171 ± 1895.055 ops/s
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 16 thrpt 10 30414.035 ± 3477.621 ops/s
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 128 thrpt 10 27184.412 ± 4789.360 ops/s
[info] ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8
@zaharidichev
zaharidichev / gist:0b0d1219ab0d740af4569bcf1a0618a9
Created May 26, 2017 19:46
Affinity dispatcher benchmarks
Benchmark (dispatcher) (numActors) (threads) (throughput) Mode Cnt Score Error Units
ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 128 8 1 thrpt 10 58358.753 ± 5270.535 ops/s
ThreadpoolBenchmark.pingPong affinity-threadpool-dispatcher 256 8 1 thrpt 10 33101.067 ± 2022.473 ops/s
ThreadpoolBenchmark.pingPong default-threadpool-dispatcher 128 8 1 thrpt 10 29639.695 ± 1914.299 ops/s
ThreadpoolBenchmark.pingPong default-threadpool-dispatcher 256 8 1 thrpt 10 15540.180 ± 1169.904 ops/s
final case class Tuple1[@specialized(Int, Long, Double) +T1](_1: T1)
final case class Tuple3[+T1, +T2, +T3](_1: T1, _2: T2, _3: T3)
public static final specialization.PlacingRooks$Rook $anonfun$main$2(int, int);
Code:
0: new #112 // class specialization/PlacingRooks$Rook$mcI$sp
3: dup
4: iload_0
5: iload_1
6: getstatic #115 // Field specialization/PlacingRooks$White$.MODULE$:Lspecialization/PlacingRooks$White$;
9: invokespecial #118 // Method specialization/PlacingRooks$Rook$mcI$sp."<init>":(IILspecialization/PlacingRooks$Color;)V
12: areturn
object PlacingRooks {
sealed trait Color
case object White extends Color
case object Black extends Color
case class Rook[@specialized(Int) T](x:T, y:T, color: Color)
def main(args: Array[String]): Unit = {
val boardOfRooks = for {
x <- 1 to 2048
num #instances #bytes class name
-------------------------------------------------------------------------------
1: 4194304 100663296 specialization.PlacingRooks$Rook
2: 196777 28242760 [Ljava.lang.Object;
3: 1733511 27736176 java.lang.Integer
num #instances #bytes class name
-------------------------------------------------------------------------------
1: 8827741 141243856 java.lang.Integer
2: 4194304 100663296 specialization.PlacingRooks$Rook
3: 169776 24354616 [Ljava.lang.Object;
public static final specialization.PlacingRooks$Rook $anonfun$main$2(int, int);
Code:
0: new #22 // class specialization/PlacingRooks$Rook
3: dup
4: iload_0
5: invokestatic #106 // Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
8: iload_1
9: invokestatic #106 // Method scala/runtime/BoxesRunTime.boxToInteger:(I)Ljava/lang/Integer;
12: getstatic #109 // Field specialization/PlacingRooks$White$.MODULE$:Lspecialization/PlacingRooks$White$;
15: invokespecial #112 // Method specialization/PlacingRooks$Rook."<init>":(Ljava/lang/Object;Ljava/lang/Object;Lspecialization/PlacingRooks$Color;)V
object PlacingRooks {
sealed trait Color
case object White extends Color
case object Black extends Color
case class Rook[T](x:T, y:T, color: Color)
def main(args: Array[String]): Unit = {
val boardOfRooks = for {
x <- 1 to 2048
public static final specialization.PlacingRooks$Rook $anonfun$main$2(int, int);
Code:
0: new #22 // class specialization/PlacingRooks$Rook
3: dup
4: iload_0
5: iload_1
6: getstatic #103 // Field specialization/PlacingRooks$White$.MODULE$:Lspecialization/PlacingRooks$White$;
9: invokespecial #106 // Method specialization/PlacingRooks$Rook."<init>":(IILspecialization/PlacingRooks$Color;)V
12: areturn