🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #13305

Re: String Processing Instruction

#13305
From: metzger
Date: Fri, 27 Mar 1987 19:26
20 lines
1981 bytes
In article <18036@ucbvax.BERKELEY.EDU> shebanow@ji.Berkeley.EDU.UUCP (Mike Shebanow) writes:
>Every time I trace a program which uses stdio to any great degree, I find
>printf to be the worst offender (with regard to time consumed). In fact,
>I have seen programs which spend 30% of their time in printf (actually
>_doprnt). In the code I have optimized, I usually try to eliminate the
>use of printf (which can make the code rather opaque). This does result
>in 10-20% improvements in speed. The most obvious use of new string
>processing instructions would be to improve the performance of printf.
>Has anyone done this?

Here at Project Synthesis we found that out a while back. It is pretty
strange to think of it that way, but yes, Printf and friends are
compute bound, not I/O bound. 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.

Perry Metzger
Technical Details
Message-ID: <4504@columbia.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!columbia!heathcliff.columbia.edu!metzger
References: <15292@amdcad.UUCP> <978@ames.UUCP> <15694@sun.uucp> <18036@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!husc6!seismo!columbia!heathcliff.columbia.edu!metzger
From: metzger@heathcliff.columbia.edu.UUCP
Newsgroups: comp.arch,comp.lang.c
Subject: Re: String Processing Instruction
Message-ID: <4504@columbia.UUCP>
Date: Fri, 27-Mar-87 14:26:33 EST
Article-I.D.: columbia.4504
Posted: Fri Mar 27 14:26:33 1987
Date-Received: Sat, 28-Mar-87 14:59:23 EST
References: <15292@amdcad.UUCP> <978@ames.UUCP> <15694@sun.uucp> <18036@ucbvax.BERKELEY.EDU>
Sender: nobody@columbia.UUCP
Reply-To: metzger@heathcliff.columbia.edu.UUCP (Perry Metzger)
Distribution: na
Organization: Columbia University CS Department, Project Synthesis
Lines: 20
Keywords: instruction set architectures, Am29000, printf