Squeak is doing a *lot* of gettimeofday()
John M McIntosh
johnmci at smalltalkconsulting.com
Tue Feb 12 19:46:42 UTC 2002
>Spot on. It would be wonderful if someone put in all the checks for
>EINTR so that this could be enabled more often. There's no reason for
>this primitive to be so expensive.
>
>.
But what about using PTHREAD support instead! Seems a simple choice
for many platforms that have PTHREAD, or maybe I should ask which
(mainstream) U**X wouldn't support it to justify the
coding/validation of all these EINTR checks.
Also it's a gotha for plugin builders.
>Scott say:
>> Although John's solution works, its not the ideal; it makes the checks a
>> little cheaper, but does not remove them. This still leaves behind a
>> noticable overhead. While, THIS:
>
>It should make them a *LOT* cheaper: it's a variable read versus a
>system call.
On many high end cpus the variable read kinda disappears into the
clutter as multiple logic units fiddle with the instruction stream.
The timeofday is *way* more expensive, perhaps a million times.
--
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
===========================================================================
More information about the Squeak-dev
mailing list
|