Skip to content

Instantly share code, notes, and snippets.

@ackratos
Created December 10, 2017 14:45
Show Gist options
  • Save ackratos/ea47f71cade651efb5af50e6548fa2cc to your computer and use it in GitHub Desktop.
Save ackratos/ea47f71cade651efb5af50e6548fa2cc to your computer and use it in GitHub Desktop.
scala performance contribution tips
Could you please post your method for generating those benchmark results. The error margins appears too high to draw conclusions, so perhaps you ran with insufficient warmup, iterations etc? Did you build the library with the optimizer enabled? (sbt setupPublishCore dist/mkPack will do this.)
Microbenchmarks should only call the code under test, so please remove the assertions (they are still run in test/junit/scala/util/matching/RegexTest.scala, the source of the examples you are benchmarking.
What was the primary motivation to create a custom benchmark runner for this test? I tend to enable profilers interactively jmh:run -prof gc ... in the SBT shell.
@ackratos
Copy link
Author

ackratos commented Jan 15, 2018

collection-strawman https://github.com/scala/collection-strawman

; compile; test; junit/test; scalacheck/test
timeBenchmark/charts ImmutableArrayBenchmark

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