From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 09:08:32 2006 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90BD116A4DD; Tue, 5 Sep 2006 09:08:32 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD60243D4C; Tue, 5 Sep 2006 09:08:31 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail18.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k8598TtL009780 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 5 Sep 2006 19:08:30 +1000 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.6/8.13.6) with ESMTP id k8598TS9001243; Tue, 5 Sep 2006 19:08:29 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.6/8.13.6/Submit) id k8598TCf001242; Tue, 5 Sep 2006 19:08:29 +1000 (EST) (envelope-from peter) Date: Tue, 5 Sep 2006 19:08:29 +1000 From: Peter Jeremy To: Giorgos Keramidas Message-ID: <20060905090829.GC753@turion.vk2pj.dyndns.org> References: <200608281545.k7SFjn6l063922@lurza.secnetix.de> <200609020956.54008.Lucas.James@ldjcs.com.au> <20060902031247.GE749@turion.vk2pj.dyndns.org> <20060904192006.GA3292@turion.vk2pj.dyndns.org> <20060905074043.GA87471@gothmog.pc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZJcv+A0YCCLh2VIg" Content-Disposition: inline In-Reply-To: <20060905074043.GA87471@gothmog.pc> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.12-2006-07-14 Cc: freebsd-current@FreeBSD.org, Garance A Drosehn Subject: Re: Adding a '-D date' option to `cat' X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 09:08:32 -0000 --ZJcv+A0YCCLh2VIg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 2006-Sep-05 10:40:43 +0300, Giorgos Keramidas wrote: >On 2006-09-05 03:28, Garance A Drosehn wrote: >> I intend to commit this within a few days, unless there are major >> objections to it. I am posting this HEADSUP under a new subject, >> so people can dump all kinds of paint over me before I commit it. > >If you really plan to commit this, please consider Julian's original >approach of comparing the gettimeofday() results with previous runs and >re-using previous output of strftime(), since the latter is probably a >quite 'expensive' operation. strftime(3) is relatively cheap (similar to non-FP printf formats). localtime(3) _is_ relatively expensive though, so this is a good idea. This is also a trivial change because the strftime() output is already effectively cached so it's just a matter of caching the time(3) result and comparing. (strptime(3) is a very expensive operation but we don't need it). --=20 Peter Jeremy --ZJcv+A0YCCLh2VIg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFE/T6N/opHv/APuIcRAgjCAJ4+bB2fHjVf8WE0tkL5Lfk+ZQFnnQCgrrUK 3tlg4ub0ZUAZAkBMPRE3Buo= =tm2W -----END PGP SIGNATURE----- --ZJcv+A0YCCLh2VIg--