rozetta~/devel/c%>sysctl hw.model
hw.model: Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
rozetta~/devel/c%>./bench_time 9079882 | sort -rnk1
Timing micro-benchmark. 9079882 syscall iterations.
Avg. us/call Elapsed Name
1.405469 12.761494 clock_gettime(2/CLOCK_REALTIME)
1.313101 11.922799 time(3)
1.305518 11.853953 clock_gettime(2/CLOCK_MONOTONIC)
1.303947 11.839681 gettimeofday(2)
0.442908 4.021557 clock_gettime(2/CLOCK_PROF)
0.436484 3.963223 clock_gettime(2/CLOCK_VIRTUAL)
0.217718 1.976851 clock_gettime(2/CLOCK_MONOTONIC_FAST)
0.215264 1.954571 clock_gettime(2/CLOCK_REALTIME_FAST)
0.211779 1.922932 clock_gettime(2/CLOCK_SECOND)
These seem about right for a normal untuned ~2GHz system:
This begs the question, tuning for time calls. Do you have a best
practice that you use for reducing the cost of time calls? -sc
--
Sean Chittenden
[EMAIL PROTECTED]
http://sean.chittenden.org/
_______________________________________________
freebsd-performance@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[EMAIL PROTECTED]"