> My algorithms work perfectly fine for small inputs,
> but when I go for amazon machine and want to compute larger inputs, my code
> hangs on forever

There is one more thing that I'd check (that I already told [1]). You
reported a HPPC bug once but that involved a load factor of 1 on maps.
This was a bug and I fixed it but a load factor of 1 is *purely
theoretical* on hash maps using open (or linear) addressing. A full
map effectively means the number of collisions and empty-slot searches
goes sky-high so the effect you're observing (works on small inputs,
"hangs" on large inputs) is exactly what this may be -- searching for
empty slots on nearly full maps will take a long time with large
inputs. In practice "long" here means endless if you have loops that
try to get or put something in a nearly-full map.

Dawid

[1] 
https://groups.google.com/d/msg/java-high-performance-primitive-collections/bsTqQRi9nCQ/kqKUiIBFrFYJ

Reply via email to