| From | Sent On | Attachments |
|---|---|---|
| Sean Chittenden | Jun 2, 2008 5:21 am | |
| Claus Guttesen | Jun 2, 2008 8:26 am | |
| Gary Stanley | Jun 2, 2008 9:34 am | |
| Bruce Evans | Jun 2, 2008 10:55 am | |
| Bruce Evans | Jun 2, 2008 11:25 am | |
| Bruce Evans | Jun 2, 2008 5:10 pm | |
| Sean Chittenden | Jun 2, 2008 7:05 pm | |
| Sean Chittenden | Jun 2, 2008 7:11 pm | |
| Gary Stanley | Jun 2, 2008 7:58 pm | |
| Gary Stanley | Jun 2, 2008 8:24 pm | |
| Bruce Evans | Jun 3, 2008 8:02 am | |
| Bruce Evans | Jun 3, 2008 9:19 am | |
| Bruce Evans | Jun 3, 2008 9:31 am | |
| Bruce Evans | Jun 3, 2008 10:14 am |
| Subject: | Micro-benchmark for various time syscalls... | |
|---|---|---|
| From: | Sean Chittenden (se...@chittenden.org) | |
| Date: | Jun 2, 2008 7:11:13 pm | |
| List: | org.freebsd.freebsd-performance | |
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 se...@chittenden.org http://sean.chittenden.org/





