Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!sri-unix!hplabs!decwrl!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.arch,comp.lang.c Subject: Re: String Processing Instruction Message-ID: <15793@sun.uucp> Date: Sat, 28-Mar-87 02:34:03 EST Article-I.D.: sun.15793 Posted: Sat Mar 28 02:34:03 1987 Date-Received: Sun, 29-Mar-87 09:03:53 EST References: <15292@amdcad.UUCP> <978@ames.UUCP> <15694@sun.uucp> <18036@ucbvax.BERKELEY.EDU> <4504@columbia.UUCP> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Distribution: na Organization: Sun Microsystems, Mountain View Lines: 24 Keywords: instruction set architectures, Am29000, printf Xref: utgpu comp.arch:690 comp.lang.c:1365 >>The most obvious use of new string processing instructions would be to >>improve the performance of printf. Has anyone done this? The version of "_doprnt" that comes with 4BSD and comes in the VAX System III source (althought whether it's the one that's in the library or not, I don't know), and may very well have come with UNIX 32V, is written in assembler. The 4.3BSD version, at least, does use the string *and* EDITPC instructions, although it doesn't use the string instructions for handling things like "%s". VAX System V doesn't use this version (and no, it's probably not because the assembly version doesn't handle all the formatting operators in the S5 version - I know it handles most of them, and I think it handles all of them), so I'm curious whether they dropped it because it didn't buy much. >We have experimented with a number of solutions, including a hardware >printf coprocessor for the 68020. Predictably, it improved performance >quite a bit. We also have tried using specially coded versions of printf >in assembly language that we passed through a (very time expensive) >exhaustive search optimiser and the results were also pretty good. How much did the coprocessor cost, and how much better was it than the assembly-language version?