3 ms·
A bug in the code? That makes little sense. The thing is this is a microoptimization, so the effect of taking a slightly different code path explodes and becom
by gizmo 16y ago
A bug in the code? That makes little sense.
The thing is this is a microoptimization, so the effect of taking a slightly different code path explodes and becomes significant. We could be measuring anything here.
Maybe we're measuring the internal locking mechanics of Java. Maybe we're measuring the TCP stack internals. Maybe it's just about the CPU cache. Maybe it's about context switching in his specific linux kernel.
It could be any number of things you're measuring here. Anything!
His idea of running apache tomcat and apache bench shows that he didn't really think it through, because OF COURSE a 6 microsecond difference is not going to show up because processing HTTP headers takes miliseconds! Orders of magnitude difference here!