Date: Mon, 11 Dec 2000 06:46:28 +1100 From: Peter Jeremy <peter.jeremy@alcatel.com.au> To: Matt Dillon <dillon@earth.backplane.com> Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Subject: Re: cvs commit: src/usr.bin/tail forward.c read.c reverse.c tail Message-ID: <20001211064628.A3197@pc0640.alcatel.com.au> In-Reply-To: <200012072214.eB7MEhF13510@earth.backplane.com>; from dillon@earth.backplane.com on Thu, Dec 07, 2000 at 02:14:43PM -0800 References: <XFMail.001204105855.jhb@FreeBSD.org> <3A2EEF7B.6F8F2BE@newsguy.com> <200012072214.eB7MEhF13510@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 07, 2000 at 02:14:43PM -0800, Matt Dillon wrote: > I still remember all the 'register'ized hand-optimized C code and > embedded assembly in games and libraries specifically optimized for > VAXen. It's still very much in evidence... anyone remember all the > garbage that used to be in the 'compress' program to make it go fast > on a vax? I sure do! I suspect the effort was worthwhile. I know I've hacked compress on both Xenix-286 and M680[23]0 systems and achieved substantial speed-ups. In both the VAX and M68K cases, the speedup was achieved by replacing about 1/2 page of C with one (or a few) instructions in the inner loop - the register keywords were just needed to ensure that the relevant parameters were in the correct registers. The movement to RISC architectures has significantly reduced the scope for this sort of improvement. (The IA32 can be viewed as RISC-like here since many of its CISCier instructions tend to be slower than equivalent RISC-like sequences). And the issue of exploiting instructions that don't have simple C representations (like INSZV to continue the compress example) is going away as processor architectures are designed by examining instruction sequences generated by compilers (I believe this is the main reason that the Alpha doesn't have a rotate instruction). Increasing processor speed, compiler performance and portability requirements are reducing the incentive to hand-craft code to run faster on a specific implementation. I doubt I'd bother expending the effort to try and hand-optimise compress (or gzip) on a modern IA32 or Alpha. Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001211064628.A3197>