Excessive Arrays.fill in Java not necessary.
There is a lot of code in CoreNLP like the following:
float[] initial = new float[domainDimension()];
Arrays.fill(initial, 0.0f);
I counted 10-20 in just 15 seconds by looking at the code by grepping for Arrays.fill
This isn't needed as Java defaults to 0.0 for floats and doubles so this is just wasting time.
The only argument FOR it is if you're trying to force the RAM into a cache line but I don't see any commentary on this.
Otherwise it might be just wasting time.
If you're trying to force it into a cache line calling something like Cache.forceIntoCacheline (a new method) would be a better way to document this.
I've removing all the ones that I can find, but that was < 20 (but > 15), so it must have been a quite exhaustive count!
Awesome! I'll pull in the future here... I wonder if there are any static analysis tools that do a good job here. I will try to run findbugs when I get some time.
Thanks!