Suggestions on how to get good timing on OSX?

Ben Evans benjamin.john.evans at gmail.com
Mon Mar 5 01:09:09 PST 2012


First off, note that the maximum resolution available on OS X is
microsecond level.

This means that any timings of any intervals of the order of 1us (or
less) will be reporting whether or not you caught a clock edge, not
the actual timing interval.

You can probably model this using a uniform probability distribution
(or some slight modification thereof) - but I'm not sure how much
that's going to help.

Ben

On Mon, Mar 5, 2012 at 2:56 AM, Mark Roos <mroos at roos.com> wrote:
> I have been working on execution time for my Smalltalk implementation and
> am having trouble getting repeatable times.  I am using a script from a new
> launch of java with all apps turned off.  I run the target code 10 times to
> let
> Hotspot do its thing.  What I see are times of great performance and times
> that are 30% slower after they stabilize.  Since I am trying fine grained
> changes
> in method lookups etc it makes it difficult to determine if what I try helps
> or hurts.
>
> Any suggestions on how to do a better job?  I am using a core 2 duo with
> snow leopard.
>
> thanks
> mark
>
>
> _______________________________________________
> mlvm-dev mailing list
> mlvm-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
>


More information about the mlvm-dev mailing list