C
Chris
I'm using a CPU profiler to find the bottlenecks in my app. When I run my
app normally, a particularly time-critical part takes 58 seconds to run.
When I use a CPU profiler on it, and set the profiling method to "samples",
the execution time is 40 seconds.
That's right -- it runs faster with the profiler going in the background.
This makes no sense.
Perhaps someone can speculate as to why this is happening.
I had thought that perhaps the profiler was messing with the system clock
and it wasn't *really* going faster, but I timed it with a wall clock.
Nope -- it's really faster.
I had thought that it was an IDE thing. Nope -- if I run the app on the
command line, it's slow, and if I add the -Xrunhprof:cpu=samples option to
the command line, it runs fast.
I'm using JDK 1.3.1
app normally, a particularly time-critical part takes 58 seconds to run.
When I use a CPU profiler on it, and set the profiling method to "samples",
the execution time is 40 seconds.
That's right -- it runs faster with the profiler going in the background.
This makes no sense.
Perhaps someone can speculate as to why this is happening.
I had thought that perhaps the profiler was messing with the system clock
and it wasn't *really* going faster, but I timed it with a wall clock.
Nope -- it's really faster.
I had thought that it was an IDE thing. Nope -- if I run the app on the
command line, it's slow, and if I add the -Xrunhprof:cpu=samples option to
the command line, it runs fast.
I'm using JDK 1.3.1