llbit/chunky — pull request #142 by twirrim (2013-06-13 08:35:31+00:00)
Title: Speedup

This speeds up Chunky through a couple of methods:

1) Switch to ConcurrentHashMap instead of HashMaps to reduce chance of HashMap blocking a thread (may result in slightly larger memory footprint under Java 6, due to how it was implemented. Java 7 uses lazy segment initialisation that should make it smaller)

2) Added the Apache Commons FastMath library, and used that instead of the standard Math library (You'll need to update the README.md for necessary attributions, I'm not sure of the appropriate wording I'm afraid)

Comparative benchmark.sh runs, on a quad core, i5 750 (first gen i5). Numbers fluctuate a bit between runs, but in general we're pushing between 7-10% speed improvement.

1: 443360,479257
2: 452194,473148
4: 409605,478583
8: 449779,487388
16: 447502,479587
32: 447289,473905
64: 449678,474791
128: 432537,478683
256: 455088,480393