Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!nrl-cmf!cmcl2!phri!roy
From: roy@phri.UUCP (Roy Smith)
Newsgroups: comp.lang.postscript
Subject: Re: string concatenation (efficiency)
Keywords: PostScript strings efficiency
Message-ID: <3372@phri.UUCP>
Date: 7 Jul 88 22:24:20 GMT
References: <2564@ihuxy.ATT.COM> <4059@adobe.COM> <2574@ihuxy.ATT.COM>
Reply-To: roy@phri.UUCP (Roy Smith)
Organization: Public Health Research Inst. (NY, NY)
Lines: 26

In article <2574@ihuxy.ATT.COM> nowlin@ihuxy.ATT.COM (Jerry Nowlin) writes:
> How important is efficiency in PostScript?

	A related question which has been nagging at me for a while is how
to decide how to split the computational complexity between the printer and
the PS-generating program.  For example, let's say you wanted to draw a
black-filled arrow at a 45-degree angle.  One possibility would be to use a
"arrow" routine like the one shown in the PostScript Tutorial (blue book) to
draw an arrow aligned with the coordinate axis and precede it by "45 rotate"
to change the coordinate system.  Another possibility would be to compute
the coordinates of the verticies of the arrow in the current corrdinate
system and just do a series of linetos followed by a fill.

	In the first example, you're letting the printer do the coordinate
transformations.  In the second, you do them yourself.  Similarly, you might
have a choice between "/inch {72 mul} def 0.5 inch 0.5 inch lineto" and "36
36 lineto".  The decision as to which is better depends on the relative
speeds of the printer and the machine on which the PS-generating program is
runs.  Clearly, a Macintosh producing PS code for a PrintServer-40 has
different tradeoffs from a Cray producing code for a LaserWriter.  How does
one decide?
-- 
Roy Smith, System Administrator
Public Health Research Institute
{allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net
"The connector is the network"