4 ms·
Any Java code that is that tight would probably be looking at eliminating allocations, not making them faster. Allocations mean new memory addresses, new cache
by jdmichal 7y ago
Any Java code that is that tight would probably be looking at eliminating allocations, not making them faster. Allocations mean new memory addresses, new cache lines. If you reuse the same objects for the next operation, they're already allocated and maybe even still in cache. And since Java touches all the memory on object creation anyway, resetting the object isn't too burdensome.
- deleted 7y ago[deleted]