Date: Mon, 2 Jun 2008 12:11:27 -0700 From: Sean Chittenden <sean@chittenden.org> To: Bruce Evans <brde@optusnet.com.au> Cc: freebsd-performance@freebsd.org, Claus Guttesen <kometen@gmail.com> Subject: Re: Micro-benchmark for various time syscalls... Message-ID: <CB079FCA-DE69-4A00-9B52-7A069A91DE47@chittenden.org> In-Reply-To: <20080602205953.X3162@delplex.bde.org> References: <2B465A44-2578-4675-AA17-EBE17A072017@chittenden.org> <b41c75520806020101o606d13ffqc5d599ee70a10ff9@mail.gmail.com> <20080602205953.X3162@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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 sean@chittenden.org http://sean.chittenden.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CB079FCA-DE69-4A00-9B52-7A069A91DE47>