summaryrefslogtreecommitdiff
path: root/test/benchmarks
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5741 from monkey-mas/bump-up-sbt-jmh-to-0.2.21Seth Tisue2017-03-211-1/+1
|\ | | | | Bump up sbt-jmh to 0.2.21
| * Bump up sbt-jmh to 0.2.21Masaru Nomura2017-02-251-1/+1
| | | | | | | | With this change, we'll use JMH 1.17.4.
* | Add benchmarks for Map4 to HashMap and Set4 to HashSet transitionsRory Graves2017-03-042-0/+58
| |
* | Fix compile error on existing ListBenchmarkRory Graves2017-03-041-6/+4
|/
* Merge commit '0965028809' into merge-2.11.x-to-2.12.x-20170214Seth Tisue2017-02-161-0/+72
|\
| * Add benchmark for List.mapConserveRory Graves2017-01-281-0/+15
| |
| * Optimised implementation of List.filter/filterNotRory Graves2017-01-281-0/+57
| |
* | Fix copy/pasto references to mutable package in benchmarkJason Zaugg2017-02-031-3/+1
| |
* | Benchmark for immutable.HashMap.{get, contains}Jason Zaugg2017-02-031-0/+58
| |
* | Fix how "sbt" is writtenDale Wijnand2016-12-211-4/+4
| | | | | | | | | | | | | | | | "sbt" is not an acronym (it used to be, but it isn't any longer). It's a proper name, like "iPhone" or "eBay". So, just like you wouldn't write "Get Started With EBay" or "How To Reset Your IPhone", we don't write "Using the Sbt Build".
* | add project/build.properties for benchmark projectkenji yoshida2016-12-071-0/+1
| |
* | Optimized HashTable.indexPap Lőrinc2016-11-241-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (`ops/s`, smaller is better) `Before (9c5d3f8)`: ```scala [info] # Run complete. Total time: 00:08:15 [info] [info] Benchmark (size) Mode Cnt Score Error Units [info] s.c.immutable.VectorMapBenchmark.groupBy 10 avgt 20 645.594 ± 9.435 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 100 avgt 20 2084.216 ± 37.814 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 1000 avgt 20 19878.481 ± 262.404 ns/op [info] s.c.mutable.HashMapBenchmark.get 10 avgt 20 689.941 ± 5.850 ns/op [info] s.c.mutable.HashMapBenchmark.get 100 avgt 20 7357.330 ± 45.956 ns/op [info] s.c.mutable.HashMapBenchmark.get 1000 avgt 20 95767.200 ± 1550.771 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 10 avgt 20 509.181 ± 2.683 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 100 avgt 20 5563.301 ± 32.335 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 1000 avgt 20 71965.365 ± 1809.738 ns/op [info] s.c.mutable.HashMapBenchmark.put 10 avgt 20 247.270 ± 3.972 ns/op [info] s.c.mutable.HashMapBenchmark.put 100 avgt 20 5646.185 ± 106.172 ns/op [info] s.c.mutable.HashMapBenchmark.put 1000 avgt 20 81303.663 ± 954.938 ns/op ``` `Changed modulo to bitwise and in hash calculation (4c729fe)`: ```scala [info] Benchmark (size) Mode Cnt Score Error Units [info] s.c.immutable.VectorMapBenchmark.groupBy 10 avgt 20 631.291 ± 9.269 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 100 avgt 20 2077.885 ± 59.737 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 1000 avgt 20 15458.278 ± 317.347 ns/op [info] s.c.mutable.HashMapBenchmark.get 10 avgt 20 678.013 ± 4.453 ns/op [info] s.c.mutable.HashMapBenchmark.get 100 avgt 20 7258.522 ± 76.088 ns/op [info] s.c.mutable.HashMapBenchmark.get 1000 avgt 20 94748.845 ± 1226.120 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 10 avgt 20 498.042 ± 5.006 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 100 avgt 20 5243.154 ± 110.372 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 1000 avgt 20 68194.752 ± 655.436 ns/op [info] s.c.mutable.HashMapBenchmark.put 10 avgt 20 257.275 ± 1.411 ns/op [info] s.c.mutable.HashMapBenchmark.put 100 avgt 20 5318.532 ± 152.923 ns/op [info] s.c.mutable.HashMapBenchmark.put 1000 avgt 20 79607.160 ± 651.779 ns/op ``` `Optimized HashTable.index (6cc1504)`: ```scala [info] Benchmark (size) Mode Cnt Score Error Units [info] s.c.immutable.VectorMapBenchmark.groupBy 10 avgt 20 616.164 ± 4.712 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 100 avgt 20 2034.447 ± 14.495 ns/op [info] s.c.immutable.VectorMapBenchmark.groupBy 1000 avgt 20 14712.164 ± 119.983 ns/op [info] s.c.mutable.HashMapBenchmark.get 10 avgt 20 679.046 ± 6.872 ns/op [info] s.c.mutable.HashMapBenchmark.get 100 avgt 20 7242.097 ± 41.244 ns/op [info] s.c.mutable.HashMapBenchmark.get 1000 avgt 20 95342.919 ± 1521.328 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 10 avgt 20 488.034 ± 4.554 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 100 avgt 20 4883.123 ± 59.268 ns/op [info] s.c.mutable.HashMapBenchmark.getOrElseUpdate 1000 avgt 20 65174.034 ± 496.759 ns/op [info] s.c.mutable.HashMapBenchmark.put 10 avgt 20 267.983 ± 1.797 ns/op [info] s.c.mutable.HashMapBenchmark.put 100 avgt 20 5097.351 ± 104.538 ns/op [info] s.c.mutable.HashMapBenchmark.put 1000 avgt 20 78772.540 ± 543.935 ns/op ``` Summary, i.e. the effect of this PR, according to the benchmarks: * `groupBy` has a `~35%` speedup * `get` didn't change * `getOrElseUpdate` has a `~10%` speedup * `put` has a `~3%` speedup Note: caching the `exponent` to a local private field (`Byte` or `Int`) didn't have any performance advantage (only a minor slowdown was measured, possibly because it's accessed via an interface now)
* | Added benchmarks for Vector and HashMapPap Lőrinc2016-11-182-0/+102
| |
* | Updated benchmark dependenciesPap Lőrinc2016-11-183-8/+5
| |
* | Bump sbt-jmh version to 0.2.16Masaru Nomura2016-09-291-1/+1
| | | | | | | | | | | | | | It'd be good to use the latest version. From sbt-jmh version 0.2.10, Flight Recorder / Java Mission Control is available[1], which would be nice. [1] https://github.com/ktoso/sbt-jmh#using-oracle-flight-recorder
* | Use 2.12.0-M4-9901daf as STARR (see #5152)Adriaan Moors2016-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit switches to using 2.12.0-M3-dc9effe as STARR, so that we can switch to the new trait encoding where each concrete trait member gets a a static member, which has the actual implementation (as well as serving as a target for for super calls using invokestatic), and a default member (forwards to the static member). Also bump partest to 1.0.17 -- the release that goes with the in-sourcing of scalacheck. Replace a few more -Yopt with -opt (for our new STARR)
* | scala version in benchmark projectLukas Rytz2016-06-021-1/+1
| |
* | Merge commit '90215ce' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-014-82/+251
|\|
| * SI-9789 use quadratic probing in OpenHashMapPerformant Data LLC2016-05-264-82/+251
| | | | | | | | | | | | | | | | | | | | | | | | The original probe sequence, taken from Python's hash table code, is exponential, jumping around in the hash table with poor memory locality. This replaces the probe algorithm with the more conventional quadratic probing. This also adds tests to the benchmarking code using AnyRef keys, which have pseudorandom hash codes (unlike Ints, whose hash code is simply the Int itself). The intensity of the benchmarking is reduced to make the tests complete within 9 hours, by removing unnecessary sampling.
* | Merge commit 'cba585d' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-017-0/+457
|\|
| * Enable full compiler optimizations in JMH benchmarking.Performant Data LLC2016-05-051-1/+1
| |
| * Address JMH benchmark reviewer's issues.Performant Data LLC2016-05-033-59/+61
| | | | | | | | | | Besides tweaks to the documentation, this tests smaller (25-element) maps, and rewrites OpenHashMapRunner in more idiomatic Scala.
| * Improve the OpenHashMapBenchmark run times.Performant Data LLC2016-05-031-7/+14
| | | | | | | | | | For the warm-up invocations, suppress setup and teardown that is only needed for the measurement iterations. Reduce the number of forks.
| * Add a JMH runner class to the library benchmark framework.Performant Data LLC2016-05-033-9/+167
| |
| * Benchmark the OpenHashMap memory usage.Performant Data LLC2016-05-034-11/+35
| | | | | | | | Also add sbteclipse to the benchmark project.
| * Add get() tests to OpenHashMap, reduce timing artifacts.Performant Data LLC2016-05-031-35/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get a better exploration of the variance of tests in a limited time, I've reduced the number of measurement iterations and increased the number of forks. By sight, the measurement iterations seemed pretty consistent within a trial, whereas they would vary widely on occasional forks. I extended testing down to 50-entry maps, to explore the rise in service times that I was seeing at small scale. This is probably a timing artifact, from too-short invocations, since I'm using @Level.Invocation in the put() tests. To fix that, I enlarged the unit of testing, by creating multiple, sometimes thousands, of maps for the invocation to fill. This has also changed the test from filling a previously-filled map, to filling a new, but sufficiently sized map. The put()/remove() test now performs much worse (on a more realistic scenario). This also adds a couple tests for calling get() against a map that's been filled only with put()s, or with a mix of put() and remove().
| * Add a reference to Doug Lea's benchmarks.Performant Data LLC2016-05-031-1/+2
| |
| * Add JMH to the benchmark framework.Performant Data LLC2016-05-035-0/+156
| | | | | | | | Add an example benchmark for OpenHashMap.
* | Remove further references to forkjoinJason Zaugg2015-07-1586-64147/+0
|/ | | | | | | | | | | | | | | | | Use j.u.c.Forkjoin directly in active and disabled tests Remove bitrotted benchmarks code I was going to update these to use `java.util.concurrent.ForkJoin` directly, instead of our deprecated stubs. But most of them don't compile anymore (e.g. scala.testing.Benchmark has been removed, ClassTag imports missing). While I'm all for benchmarks, we should have large swathes of code checked in that isn't at compiled and run automatically. I'm happy to help someone resurrect these in a suitable form.
* Merge pull request #4589 from janekdb/2.11.x-method-names-m-oJason Zaugg2015-06-291-3/+3
|\ | | | | Improve method names (m-o)
| * Improve method names (m-o)Janek Bogucki2015-06-281-3/+3
| |
* | Fix 23 typos (m-o)Janek Bogucki2015-06-281-2/+2
|/
* Fix many typos in docs and commentsmpociecha2014-12-141-1/+1
| | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* migrates stdlib and compiler to tagsEugene Burmako2012-04-232-17/+17
| | | | | * all usages of ClassManifest and Manifest are replaced with tags * all manifest tests are replaced with tag tests
* Range.foreach optimization.Paul Phillips2011-12-121-0/+61
| | | | | | | | | | | This makes code like 0 to 100 foreach (x += _) as fast as (often faster than, in fact) a while loop. See the comment in Range for the gory details. More investigation should be done regarding total impact on inlining behavior. Review by @odersky.
* Begone t1737...Hubert Plociniczak2011-11-0273-477/+477
|
* Refinement of murmurhash implementation.Paul Phillips2011-09-081-68/+80
| | | | | | Integrates recent speed improvements to algorithm. Contributed by Ruediger Keller, no review.
* Sped up traversal over mutable maps by a factor...Paul Phillips2011-08-011-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sped up traversal over mutable maps by a factor of two. There was this comment in HashTable explaining why foreach was implemented in terms of iterator. /* * We should implement this as a primitive operation over the * underlying array, but it can cause a behaviour change in edge cases * where: * - Someone modifies a map during iteration * - The insertion point is close to the iteration point. */ Item 1: foreach and iterator didn't behave the same if the map was mutated in the midst of the traversal anyway. Item 2: protecting some particular undefinition of inherently undefined behavior is a pretty unconvincing reason to impose a 2x penalty on foreach. Here are the before/after times for traversing the keys with foreach vs. with iterator. Same impact on values and on the map itself. The benchmark code is included in this commit. before: foreach 143700900 iterator 143848900 after: foreach 67024400 iterator 144890300 Respecting the fact that this might be causing some behavior somewhere to change, even though it would be pretty sick to be relying upon it, ** ATTENTION! POSSIBLE BEHAVIOR CHANGE! ** Review by dragos.
* Merge branch 'work'Aleksandar Pokopec2011-01-266-0/+61
| | | | | | Conflicts: src/library/scala/concurrent/SyncVar.scala
* A new murmur3 hashcode implementation contribut...Paul Phillips2011-01-251-0/+241
| | | | | | | | | | | | | A new murmur3 hashcode implementation contributed by rex kerr. I'm really happy with it. There is benchmarking code included but you can use the pudding for proof: the compiler compiling itself is clearly faster. I deleted the existing murmur2 implementation which has never left trunk in a release. There remain some possible points of improvement with inlining and/or synthetic method generation, but this is a major improvement over the status quo. Closes #2537, review by prokopec.
* Merge branch 'work'Aleksandar Pokopec2011-01-121-4/+6
|
* Enabled parallel group by.Aleksandar Pokopec2011-01-101-0/+1
| | | | | No review.
* Test case change.Aleksandar Pokopec2011-01-071-1/+1
| | | | | No review
* Implemented a (slower) workaround for parallel ...Aleksandar Pokopec2011-01-076-31/+163
| | | | | | | | Implemented a (slower) workaround for parallel vectors. Implemented group by. No review.
* Changed foreach to pforeach.Aleksandar Pokopec2011-01-075-12/+12
| | | | | No review.
* Bencharking a larger program with parallel coll...Aleksandar Pokopec2010-12-216-1/+58278
| | | | | | | | | Bencharking a larger program with parallel collections. Fixed a couple of bugs in parallel collections. No review.
* A minor update in a benchmark.Aleksandar Pokopec2010-12-211-1/+2
| | | | | No review.
* Made parallel collections serializable.Aleksandar Pokopec2010-12-097-7/+7
| | | | | No review.
* Array combiners implementation changed from arr...Aleksandar Pokopec2010-12-094-0/+60
| | | | | | | | | Array combiners implementation changed from array buffers to doubling unrolled buffers to avoid excessive copying. Still evaluating the benefits of this. No review.
* Fixed parallel ranges to use the same range log...Aleksandar Pokopec2010-12-092-3/+6
| | | | | | | | | | Fixed parallel ranges to use the same range logic under the hood, and not introduce code duplication. Slight fix in Tasks. No review.