[vox-tech] benchmarking (again)
Jeff Newmiller
jdnewmil at dcn.davis.ca.us
Fri Feb 17 19:28:40 PST 2006
Gabriel G. Rosa wrote:
> On Fri, Feb 17, 2006 at 02:03:36PM -0800, Mark K. Kim wrote:
>
>>As Jeff pointed out, Cygwin can be a bit of an oddball. I'm not sure
>>what happens if you run `time` on a non-Cygwin program like a JVM.
>>Also, I'm not sure what JVM considers "system" and "user" time -- if the
>>whole program gets executed by the JVM as a system driver then "system"
>>time is what C++ would consider a "user" time.
If it was a system driver then it would show up under "system" time.
It is simply running in a user process that Cygwin isn't paying
attention to.
> Doesn't the JVM stay pre-loaded under Windows? That would explain the
> shorter execution time (no startup overhead).
A pre-loaded JVM could explain this behavior, but the startup
overhead is a red herring, because the execution time was
way too short to represent the execution time of the program Peter
presented. What was being timed was the process that was kicking off
the actual JVM. This process would have gone passive after the JVM
got going, so its "user" time would be short and constant. If the JVM
was in memory, it would avoid JVM startup time but would still have
to initialize memory for the benchmark program. In any event, the JVM
user time was apparently not included in the user time of the process
that was used to kick it off (unlike under Linux). You would get more
representative results watching the "Real" time value on an unloaded Winbox
than looking at "user" time because the process that cygwin was timing
would still have to wait for the JVM to finish the benchmark program
before returning control to the user. (You could subtract out the
real time of a zero-repetitions version of the program from the
real time of the million repetitions version of the program to zero
in on the time spent doing floating point operations.)
--
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
More information about the vox-tech
mailing list