[Eventmachine-talk] Ruby I/O

Francis Cianfrocca
Tue, 13 Mar 2007 16:32:02 -0000

On 3/13/07, Thomas Ptacek <tqbf at matasano.com>
wrote:
>
> A SWAG, created exclusively in the service of not cluttering the list
> with another 500 word message without writing a line of code:
>
> http://pastie.caboo.se/46697
>
> tsc_gettimeofday() from this link is thus a drop-in replacement for
> g.t.o.d(). I haven''t profiled; I recalibrate every 20 calls
> (calibrating the TSC is a pain). I make no claims to performance,
> portability, or correctness.



What''s the strategy here? You calculate an average delta value between
calls
and re-set against the real time every twenty times? So the real timesaver
is that you avoiding the kernel crossing?
-------------- next part --------------
An HTML attachment was scrubbed...