| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| | |
|
| |
| |
| |
| |
| | |
Besides tweaks to the documentation, this tests smaller (25-element)
maps, and rewrites OpenHashMapRunner in more idiomatic Scala.
|
| |
| |
| |
| |
| | |
For the warm-up invocations, suppress setup and teardown that is only
needed for the measurement iterations. Reduce the number of forks.
|
| | |
|
| |
| |
| |
| | |
Also add sbteclipse to the benchmark project.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 an example benchmark for OpenHashMap.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Improve method names (m-o)
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* all usages of ClassManifest and Manifest are replaced with tags
* all manifest tests are replaced with tag tests
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Integrates recent speed improvements to algorithm.
Contributed by Ruediger Keller, no review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Conflicts:
src/library/scala/concurrent/SyncVar.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review
|
|
|
|
|
|
|
|
| |
Implemented a (slower) workaround for parallel vectors. Implemented
group by.
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
| |
Bencharking a larger program with parallel collections.
Fixed a couple of bugs in parallel collections.
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
| |
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 logic under the hood, and
not introduce code duplication.
Slight fix in Tasks.
No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Special cased with thread pool executor scheduling. Fixed an ugly
concurrency bug where futures returned by a thread pool executor didn't
remove the task from the queue when cancel was called. Note to self and
others: don't cancel futures returned by thread pool executors, it might
lead to unexpected behaviour. Modified the executor to add new threads
if all the active threads are syncing, in order to avoid deadlocks.
Fixed a hidden bug in AdaptiveWorkStealingTasks, where correct behaviour
depended on the execution order of the tasks. This didn't fail before
with ForkJoinTasks, since there the execution order is well-defined.
Scalachecked 1.5 & 1.6 support.
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
|
|
|
|
|
|
|
|
|
| |
Performance bug in hash table splitter fixed, where size map was not
used and all the elements were counted instead.
Performance tests now pass.
No review
|
|
|
|
|
| |
No review.
|
|
|
|
|
| |
No review.
|
| |
|
|
|
|
|
|
| |
Adds a zip for ParIterables + a new Zipped view for ParSeqView and
ParIterableView + a bench test. No review
|
|
|
|
|
|
| |
Reimplementing parallel views to solve several performance glitches. No
review.
|
|
|
|
|
|
| |
Refactorings to make iterators required by task objects less restricted.
No review
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added scalacheck folder, scalacheck source update script, and scalacheck
ant tasks.
Build process will now generate a scalacheck jar in the build/pack/lib
directory. It generates it from the scalacheck source in the
src/scalacheck dir. If the source there gets out of date, it is to be
updated manually using the tools/updatescalacheck script.
Review by phaller.
|
| |
|
| |
|