Skip to content

Instantly share code, notes, and snippets.

@sergeykolbasov
Created September 28, 2018 19:52
Show Gist options
  • Save sergeykolbasov/a0bbb20777fdf6da371a28ce707a08e3 to your computer and use it in GitHub Desktop.
Save sergeykolbasov/a0bbb20777fdf6da371a28ce707a08e3 to your computer and use it in GitHub Desktop.
Finch cats-effect benchmark

With cats.effect.IO:

[info] Benchmark                                                                    Mode  Cnt       Score       Error   Units
[info] JsonAndTextNegotiatedBootstrapBenchmark.foos                                thrpt   10   28449.544 ±  3887.823   ops/s
[info] JsonAndTextNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm            thrpt   10   79800.658 ±  1312.407    B/op
[info] JsonBootstrapBenchmark.foos                                                 thrpt   10   18630.972 ±  2404.050   ops/s
[info] JsonBootstrapBenchmark.foos:·gc.alloc.rate.norm                             thrpt   10  112024.079 ±    12.754    B/op
[info] JsonNegotiatedBootstrapBenchmark.foos                                       thrpt   10   18668.871 ±  1511.295   ops/s
[info] JsonNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm                   thrpt   10  110568.082 ±  2435.077    B/op
[info] TextBootstrapBenchmark.foos                                                 thrpt   10   59870.966 ±  4066.127   ops/s
[info] TextBootstrapBenchmark.foos:·gc.alloc.rate.norm                             thrpt   10   47672.026 ±     0.009    B/op
[info] TextNegotiatedBootstrapBenchmark.foos                                       thrpt   10   60666.425 ±  5039.020   ops/s
[info] TextNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm                   thrpt   10   47736.025 ±     0.009    B/op
[info] BodyBenchmark.byteArray                                                      avgt   10     250.548 ±    16.385   ns/op
[info] BodyBenchmark.byteArray:·gc.alloc.rate.norm                                  avgt   10     360.000 ±     0.001    B/op
[info] BodyBenchmark.byteArrayOption                                                avgt   10     246.461 ±     4.441   ns/op
[info] BodyBenchmark.byteArrayOption:·gc.alloc.rate.norm                            avgt   10     376.000 ±     0.001    B/op
[info] BodyBenchmark.foo                                                            avgt   10    1168.275 ±    37.232   ns/op
[info] BodyBenchmark.foo:·gc.alloc.rate.norm                                        avgt   10    2520.001 ±     0.001    B/op
[info] BodyBenchmark.fooOption                                                      avgt   10    1109.195 ±    33.585   ns/op
[info] BodyBenchmark.fooOption:·gc.alloc.rate.norm                                  avgt   10    2536.000 ±     0.001    B/op
[info] BodyBenchmark.string                                                         avgt   10    1014.035 ±    33.952   ns/op
[info] BodyBenchmark.string:·gc.alloc.rate.norm                                     avgt   10    2448.000 ±     0.001    B/op
[info] BodyBenchmark.stringOption                                                   avgt   10    1034.419 ±    52.272   ns/op
[info] BodyBenchmark.stringOption:·gc.alloc.rate.norm                               avgt   10    2464.000 ±     0.001    B/op
[info] CoproductBenchmark.bothMatched                                               avgt   10     119.581 ±     4.953   ns/op
[info] CoproductBenchmark.bothMatched:·gc.alloc.rate.norm                           avgt   10     304.000 ±     0.001    B/op
[info] CoproductBenchmark.leftMatched                                               avgt   10      85.861 ±     1.976   ns/op
[info] CoproductBenchmark.leftMatched:·gc.alloc.rate.norm                           avgt   10     200.000 ±     0.001    B/op
[info] CoproductBenchmark.rightMatched                                              avgt   10      86.498 ±     3.278   ns/op
[info] CoproductBenchmark.rightMatched:·gc.alloc.rate.norm                          avgt   10     200.000 ±     0.001    B/op
[info] ExtractPathBenchmark.booleanNone                                             avgt   10      51.939 ±     1.355   ns/op
[info] ExtractPathBenchmark.booleanNone:·gc.alloc.rate.norm                         avgt   10     128.000 ±     0.001    B/op
[info] ExtractPathBenchmark.booleanSome                                             avgt   10     360.747 ±    10.314   ns/op
[info] ExtractPathBenchmark.booleanSome:·gc.alloc.rate.norm                         avgt   10     544.000 ±     0.001    B/op
[info] ExtractPathBenchmark.intNone                                                 avgt   10      51.003 ±     1.550   ns/op
[info] ExtractPathBenchmark.intNone:·gc.alloc.rate.norm                             avgt   10     128.000 ±     0.001    B/op
[info] ExtractPathBenchmark.intSome                                                 avgt   10     373.088 ±    40.155   ns/op
[info] ExtractPathBenchmark.intSome:·gc.alloc.rate.norm                             avgt   10     528.000 ±     0.001    B/op
[info] ExtractPathBenchmark.longNone                                                avgt   10      55.977 ±     5.746   ns/op
[info] ExtractPathBenchmark.longNone:·gc.alloc.rate.norm                            avgt   10     128.000 ±     0.001    B/op
[info] ExtractPathBenchmark.longSome                                                avgt   10     372.186 ±     7.340   ns/op
[info] ExtractPathBenchmark.longSome:·gc.alloc.rate.norm                            avgt   10     544.000 ±     0.001    B/op
[info] ExtractPathBenchmark.stringNone                                              avgt   10      43.442 ±     1.399   ns/op
[info] ExtractPathBenchmark.stringNone:·gc.alloc.rate.norm                          avgt   10     120.000 ±     0.001    B/op
[info] ExtractPathBenchmark.stringSome                                              avgt   10     447.334 ±     8.774   ns/op
[info] ExtractPathBenchmark.stringSome:·gc.alloc.rate.norm                          avgt   10     704.000 ±     0.001    B/op
[info] HttpMessageBenchmark.fastChartset                                            avgt   10      78.372 ±     1.828   ns/op
[info] HttpMessageBenchmark.fastChartset:·gc.alloc.rate.norm                        avgt   10      72.000 ±     0.001    B/op
[info] HttpMessageBenchmark.slowCharset                                             avgt   10     306.161 ±   136.815   ns/op
[info] HttpMessageBenchmark.slowCharset:·gc.alloc.rate.norm                         avgt   10     368.000 ±    12.749    B/op
[info] InputBenchmark.fromEmptyPath                                                 avgt   10      10.598 ±     0.383   ns/op
[info] InputBenchmark.fromEmptyPath:·gc.alloc.rate.norm                             avgt   10      24.000 ±     0.001    B/op
[info] InputBenchmark.fromPath                                                      avgt   10     198.478 ±   123.263   ns/op
[info] InputBenchmark.fromPath:·gc.alloc.rate.norm                                  avgt   10     384.000 ±     0.001    B/op
[info] JsonBenchmark.decode                                                         avgt   10    3733.815 ±   782.957   ns/op
[info] JsonBenchmark.decode:·gc.alloc.rate.norm                                     avgt   10    4488.002 ±    25.499    B/op
[info] JsonBenchmark.encode                                                         avgt   10    5446.246 ±   430.874   ns/op
[info] JsonBenchmark.encode:·gc.alloc.rate.norm                                     avgt   10    8340.002 ±    31.873    B/op
[info] MapBenchmark.map                                                             avgt   10     143.473 ±     6.825   ns/op
[info] MapBenchmark.map:·gc.alloc.rate.norm                                         avgt   10     328.000 ±     0.001    B/op
[info] MapBenchmark.mapAsync                                                        avgt   10     129.114 ±     4.018   ns/op
[info] MapBenchmark.mapAsync:·gc.alloc.rate.norm                                    avgt   10     328.000 ±     0.001    B/op
[info] MapBenchmark.mapOutput                                                       avgt   10     157.175 ±     3.630   ns/op
[info] MapBenchmark.mapOutput:·gc.alloc.rate.norm                                   avgt   10     360.000 ±     0.001    B/op
[info] MapBenchmark.mapOutputAsync                                                  avgt   10     157.076 ±     2.667   ns/op
[info] MapBenchmark.mapOutputAsync:·gc.alloc.rate.norm                              avgt   10     360.000 ±     0.001    B/op
[info] MatchPathBenchmark.stringNone                                                avgt   10       6.004 ±     0.148   ns/op
[info] MatchPathBenchmark.stringNone:·gc.alloc.rate.norm                            avgt   10      ≈ 10⁻⁶                B/op
[info] MatchPathBenchmark.stringSome                                                avgt   10      77.148 ±     2.624   ns/op
[info] MatchPathBenchmark.stringSome:·gc.alloc.rate.norm                            avgt   10     192.000 ±     0.001    B/op
[info] ProductBenchmark.bothMatched                                                 avgt   10     272.480 ±    11.060   ns/op
[info] ProductBenchmark.bothMatched:·gc.alloc.rate.norm                             avgt   10     720.000 ±     0.001    B/op
[info] ProductBenchmark.leftMatched                                                 avgt   10      31.837 ±     0.571   ns/op
[info] ProductBenchmark.leftMatched:·gc.alloc.rate.norm                             avgt   10      80.000 ±     0.001    B/op
[info] ProductBenchmark.rightMatched                                                avgt   10       6.055 ±     0.168   ns/op
[info] ProductBenchmark.rightMatched:·gc.alloc.rate.norm                            avgt   10      ≈ 10⁻⁶                B/op
[info] TooFastStringBenchmark.someBoolean                                           avgt   10       3.563 ±     0.059   ns/op
[info] TooFastStringBenchmark.someBoolean:·gc.alloc.rate.norm                       avgt   10      ≈ 10⁻⁶                B/op
[info] TooFastStringBenchmark.someInt                                               avgt   10      14.129 ±     0.243   ns/op
[info] TooFastStringBenchmark.someInt:·gc.alloc.rate.norm                           avgt   10      16.000 ±     0.001    B/op
[info] TooFastStringBenchmark.someLong                                              avgt   10      27.954 ±     0.332   ns/op
[info] TooFastStringBenchmark.someLong:·gc.alloc.rate.norm                          avgt   10      40.000 ±     0.001    B/op

With com.twitter.util.Future

[info] Benchmark                                                                    Mode  Cnt       Score       Error   Units
[info] JsonAndTextNegotiatedBootstrapBenchmark.foos                                thrpt   10   27591.135 ±  5309.231   ops/s
[info] JsonAndTextNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm            thrpt   10   79242.864 ±   212.802    B/op
[info] JsonBootstrapBenchmark.foos                                                 thrpt   10   16009.415 ±  5127.802   ops/s
[info] JsonBootstrapBenchmark.foos:·gc.alloc.rate.norm                             thrpt   10  109168.101 ±     0.062    B/op
[info] JsonNegotiatedBootstrapBenchmark.foos                                       thrpt   10   18037.950 ±  2977.285   ops/s
[info] JsonNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm                   thrpt   10  109232.082 ±     0.034    B/op
[info] TextBootstrapBenchmark.foos                                                 thrpt   10   54652.274 ± 13082.816   ops/s
[info] TextBootstrapBenchmark.foos:·gc.alloc.rate.norm                             thrpt   10   47884.028 ±    31.874    B/op
[info] TextNegotiatedBootstrapBenchmark.foos                                       thrpt   10   55184.174 ±  6254.008   ops/s
[info] TextNegotiatedBootstrapBenchmark.foos:·gc.alloc.rate.norm                   thrpt   10   47955.673 ±    55.565    B/op
[info] BodyBenchmark.byteArray                                                      avgt   10     377.837 ±    35.098   ns/op
[info] BodyBenchmark.byteArray:·gc.alloc.rate.norm                                  avgt   10     440.000 ±    25.498    B/op
[info] BodyBenchmark.byteArrayOption                                                avgt   10     650.951 ±   398.600   ns/op
[info] BodyBenchmark.byteArrayOption:·gc.alloc.rate.norm                            avgt   10     488.000 ±    25.498    B/op
[info] BodyBenchmark.foo                                                            avgt   10    1261.807 ±   102.876   ns/op
[info] BodyBenchmark.foo:·gc.alloc.rate.norm                                        avgt   10    2576.001 ±     0.001    B/op
[info] BodyBenchmark.fooOption                                                      avgt   10    1206.168 ±   137.545   ns/op
[info] BodyBenchmark.fooOption:·gc.alloc.rate.norm                                  avgt   10    2592.001 ±     0.001    B/op
[info] BodyBenchmark.string                                                         avgt   10    1236.013 ±    35.154   ns/op
[info] BodyBenchmark.string:·gc.alloc.rate.norm                                     avgt   10    2576.001 ±     0.001    B/op
[info] BodyBenchmark.stringOption                                                   avgt   10    1220.007 ±    94.758   ns/op
[info] BodyBenchmark.stringOption:·gc.alloc.rate.norm                               avgt   10    2592.001 ±     0.001    B/op
[info] CoproductBenchmark.bothMatched                                               avgt   10     250.429 ±    16.033   ns/op
[info] CoproductBenchmark.bothMatched:·gc.alloc.rate.norm                           avgt   10     424.000 ±     0.001    B/op
[info] CoproductBenchmark.leftMatched                                               avgt   10     219.945 ±    12.995   ns/op
[info] CoproductBenchmark.leftMatched:·gc.alloc.rate.norm                           avgt   10     344.000 ±     0.001    B/op
[info] CoproductBenchmark.rightMatched                                              avgt   10     226.006 ±    24.090   ns/op
[info] CoproductBenchmark.rightMatched:·gc.alloc.rate.norm                          avgt   10     344.000 ±     0.001    B/op
[info] ExtractPathBenchmark.booleanNone                                             avgt   10      25.037 ±     0.912   ns/op
[info] ExtractPathBenchmark.booleanNone:·gc.alloc.rate.norm                         avgt   10      24.000 ±     0.001    B/op
[info] ExtractPathBenchmark.booleanSome                                             avgt   10     510.564 ±    74.776   ns/op
[info] ExtractPathBenchmark.booleanSome:·gc.alloc.rate.norm                         avgt   10     560.000 ±     0.001    B/op
[info] ExtractPathBenchmark.intNone                                                 avgt   10      28.299 ±     8.098   ns/op
[info] ExtractPathBenchmark.intNone:·gc.alloc.rate.norm                             avgt   10      24.000 ±     0.001    B/op
[info] ExtractPathBenchmark.intSome                                                 avgt   10     487.918 ±    48.998   ns/op
[info] ExtractPathBenchmark.intSome:·gc.alloc.rate.norm                             avgt   10     544.000 ±     0.001    B/op
[info] ExtractPathBenchmark.longNone                                                avgt   10      26.881 ±     9.282   ns/op
[info] ExtractPathBenchmark.longNone:·gc.alloc.rate.norm                            avgt   10      24.000 ±     0.001    B/op
[info] ExtractPathBenchmark.longSome                                                avgt   10     595.050 ±   360.700   ns/op
[info] ExtractPathBenchmark.longSome:·gc.alloc.rate.norm                            avgt   10     560.000 ±     0.001    B/op
[info] ExtractPathBenchmark.stringNone                                              avgt   10      17.809 ±     0.380   ns/op
[info] ExtractPathBenchmark.stringNone:·gc.alloc.rate.norm                          avgt   10      16.000 ±     0.001    B/op
[info] ExtractPathBenchmark.stringSome                                              avgt   10     542.226 ±    11.627   ns/op
[info] ExtractPathBenchmark.stringSome:·gc.alloc.rate.norm                          avgt   10     712.000 ±    12.749    B/op
[info] HttpMessageBenchmark.fastChartset                                            avgt   10      80.310 ±     7.723   ns/op
[info] HttpMessageBenchmark.fastChartset:·gc.alloc.rate.norm                        avgt   10      72.000 ±     0.001    B/op
[info] HttpMessageBenchmark.slowCharset                                             avgt   10     246.048 ±    48.609   ns/op
[info] HttpMessageBenchmark.slowCharset:·gc.alloc.rate.norm                         avgt   10     360.000 ±     0.001    B/op
[info] InputBenchmark.fromEmptyPath                                                 avgt   10      12.923 ±     5.941   ns/op
[info] InputBenchmark.fromEmptyPath:·gc.alloc.rate.norm                             avgt   10      24.000 ±     0.001    B/op
[info] InputBenchmark.fromPath                                                      avgt   10     155.991 ±    21.259   ns/op
[info] InputBenchmark.fromPath:·gc.alloc.rate.norm                                  avgt   10     384.000 ±     0.001    B/op
[info] JsonBenchmark.decode                                                         avgt   10    3553.299 ±   330.364   ns/op
[info] JsonBenchmark.decode:·gc.alloc.rate.norm                                     avgt   10    4504.002 ±     0.001    B/op
[info] JsonBenchmark.encode                                                         avgt   10    5352.595 ±   431.747   ns/op
[info] JsonBenchmark.encode:·gc.alloc.rate.norm                                     avgt   10    8336.002 ±    38.247    B/op
[info] MapBenchmark.map                                                             avgt   10     582.111 ±    58.270   ns/op
[info] MapBenchmark.map:·gc.alloc.rate.norm                                         avgt   10     704.000 ±     0.001    B/op
[info] MapBenchmark.mapAsync                                                        avgt   10     585.133 ±    51.960   ns/op
[info] MapBenchmark.mapAsync:·gc.alloc.rate.norm                                    avgt   10     704.000 ±     0.001    B/op
[info] MapBenchmark.mapOutput                                                       avgt   10     603.358 ±    50.095   ns/op
[info] MapBenchmark.mapOutput:·gc.alloc.rate.norm                                   avgt   10     736.000 ±     0.001    B/op
[info] MapBenchmark.mapOutputAsync                                                  avgt   10     608.858 ±    72.550   ns/op
[info] MapBenchmark.mapOutputAsync:·gc.alloc.rate.norm                              avgt   10     736.000 ±     0.001    B/op
[info] MatchPathBenchmark.stringNone                                                avgt   10       6.374 ±     0.477   ns/op
[info] MatchPathBenchmark.stringNone:·gc.alloc.rate.norm                            avgt   10      ≈ 10⁻⁶                B/op
[info] MatchPathBenchmark.stringSome                                                avgt   10     215.149 ±    18.819   ns/op
[info] MatchPathBenchmark.stringSome:·gc.alloc.rate.norm                            avgt   10     304.000 ±     0.001    B/op
[info] ProductBenchmark.bothMatched                                                 avgt   10    1058.658 ±    78.951   ns/op
[info] ProductBenchmark.bothMatched:·gc.alloc.rate.norm                             avgt   10    1472.000 ±     0.001    B/op
[info] ProductBenchmark.leftMatched                                                 avgt   10      30.222 ±     1.718   ns/op
[info] ProductBenchmark.leftMatched:·gc.alloc.rate.norm                             avgt   10      80.000 ±     0.001    B/op
[info] ProductBenchmark.rightMatched                                                avgt   10       5.572 ±     0.408   ns/op
[info] ProductBenchmark.rightMatched:·gc.alloc.rate.norm                            avgt   10      ≈ 10⁻⁶                B/op
[info] TooFastStringBenchmark.someBoolean                                           avgt   10       5.093 ±     2.060   ns/op
[info] TooFastStringBenchmark.someBoolean:·gc.alloc.rate.norm                       avgt   10      ≈ 10⁻⁶                B/op
[info] TooFastStringBenchmark.someInt                                               avgt   10      14.027 ±     0.399   ns/op
[info] TooFastStringBenchmark.someInt:·gc.alloc.rate.norm                           avgt   10      16.000 ±     0.001    B/op
[info] TooFastStringBenchmark.someLong                                              avgt   10      34.308 ±     9.856   ns/op
[info] TooFastStringBenchmark.someLong:·gc.alloc.rate.norm                          avgt   10      40.000 ±     0.001    B/op
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment