Skip to content

Instantly share code, notes, and snippets.

@chrisvest
Created April 6, 2011 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisvest/906624 to your computer and use it in GitHub Desktop.
Save chrisvest/906624 to your computer and use it in GitHub Desktop.
Install Caliper http://code.google.com/p/caliper/
Clone https://github.com/chrisvest/stormpot
$ mvn package && ./benchmark stormpot.benchmark.PartitionSelect
Compare ModuloAtomicCount with ModuloIdentityHashNewObject
- you may subtract ModuloConst from both if you want, or
ModuloIdentityHashThread from ModuloIdentityHashNewObject,
to remove a bit of the overhead.
@chrisvest
Copy link
Author

There are probably special JIT heuristics that apply to Integer. Caliper currently have some shortcomings with regards to what parameters you can pass to the measuring JVMs - it would be interesting to see the new Object() results with Escape Analysis turned on. I reckon that would bring the ModuloHashNewObject results very close to that of ModuloHashBoxed.

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