Jay Pipes wrote:
Actually, it is...the Session needs to be able to have a reliable and accurate start_time member variable set to the results of gettimeofday(). Trond benchmarked gettimeofday() versus gethrtime() this evening and found that gettimeofday() outperformed gethrtime() easily, in both threaded and non-threaded environments on Solaris, and therefore we will use gettimeofday() in the initialization of Session in order to get a start_time value for the session.
Just to be clear: gettimeofday and gethrtime give very similar performance, but the version quoted in this email with the mutex is _WAY_ slower.
If you look at http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/i386/sys/gettimeofday.s#39 and http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/common/sys/gethrtime.s#36 you see that both are implemented as fast traps.
Cheers, Trond _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

