From owner-freebsd-questions Wed May 16 1:28:57 2001 Delivered-To: freebsd-questions@freebsd.org Received: from tisch.mail.mindspring.net (tisch.mail.mindspring.net [207.69.200.157]) by hub.freebsd.org (Postfix) with ESMTP id 96D7837B423; Wed, 16 May 2001 01:28:51 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from mindspring.com (pool0141.cvx7-bradley.dialup.earthlink.net [209.178.164.141]) by tisch.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id EAA19088; Wed, 16 May 2001 04:28:48 -0400 (EDT) Message-ID: <3B023A55.D8E21C03@mindspring.com> Date: Wed, 16 May 2001 01:29:09 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matt Dillon Cc: dave , freebsd-questions@FreeBSD.ORG, arch@FreeBSD.ORG Subject: Re: Gettimeofday Again... References: <200105150337.UAA19677@gull.mail.pas.earthlink.net> <200105150346.f4F3kLE45720@earth.backplane.com> <3B00EF40.A1232B75@mindspring.com> <200105151737.f4FHbBL55271@earth.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Matt Dillon wrote: > :The gettimeofday() calls were _the_ major useless overhead, > :until I eliminated them by creating a zero system call version > > Terry, to be blunt... if you need performance you don't go > making superfluous system calls for every transaction. If > you want marketing eye candy, all you need to do is a > statistical measurement... do fine measurement of 10% of > the transactions rather then fine measurement of 100% of > the transaction, and you are done. > > Also, using gettimeofday() is a ridiculous way to measure > fine grained time billions of times in production code. I > mean, sure, it works... but getitimer() is about 5 times > faster. I didn't need it for elapsed time measurements, I needed it for log timestamps, so getitimer() would be useless. BTW... to be blunt, gettimeofday() wouldn't be _the_ major useless overhead, if I were making superfluous system calls. ;^). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message