In benchmarking some Java code on a Solaris SPARC box, I noticed that the first time I call the benchmarked function it runs EXTREMELY slowly (10x difference):
I'm optimizing a pure-java implementation of the LZF compression algorithm, which involves a lot of byte[] access and basic int mathematics for hashing and comparison. Performance really matters, because ...
package com.stackoverflow;
public class CondSpeed {
private static final long COUNT = 1000000000;
private static final long OUTER_COUNT = 15;
private static long notEqOperator = 0L;
...
As a developer, I want to know what the cost is of invoking a virtual method vs. interface method. Now, I know why invokeinterface can be slower than invokevirtual, but ...