Subject: NeWS and X

From: [email-masked]
Date: Wed, 20 May 87 05:50:07 EDT

From: [email-masked]
Date: 18 May 1987 02:36 EDT
Subject: NeWS and X

> A friend of mine said that AI group at MIT is never going to be running
> NeWS on many workstations. One of the reasons he gave was that X will
> always be at least a factor of 3 faster than NeWS.
>
> I started thinking about all of the atoi() that news always has to do,
> and the fact that it is interperted, and am beginning to think that he
> might be right. Is there any truth to this?

REGARDING atoi():
-----------------
PostScript programs are simply an ascii datastream.  NeWS gains performance
improvements by checking the high bit of the its incoming datastream.
If its just straight PostScript, no problem NeWS parses it. If the
datastream happened to be generated from a smart NeWS client, the high
bit will be set on a byte. The remaining 7 bits will clue the NeWS server
as to what token this byte should represent, or what to expect within
the next few bytes. ie. get ready for a character string server, here
is how long it is.

A C function called pprintf is provided with NeWS.  This provides
the equivalent of printf in the C library, but implements the format
described above for sending data to the NeWS server.

If you really have a performance critical client, pprintf can be
replaced with a few macros which implement the NeWS compression
format. I did this for a terminal emulator, because after profiling
I found that pprintf was taking as much time as my code which interpreted
the terminals escape code sequences.

REGARDING interpretation overhead.
----------------------------------
I think the overhead will be much less noticeable on machines with
no graphics assist.  In this case the cycles spent on rasterization
will become more important.

NeWS versus X
-------------
I have done both a mono and color NeWS port to Apollo workstations, and
am In the middle of a port of a port of X10 for a Parallax videographics
card. Which doesn't mean anything besides the fact that I've looked at the
source and have examined a few ports. I agree completly with the comments
of Guy Harris:

> If the claim is made that X is now at least a factor or 3 faster than
> NeWS, the only way to ascertain whether this claim is true or false
> would be to test it with a given application or set of applications.
> Does anybody have this sort of data?

With the added stipulation that not only are multiple applications
tested, but that they should be tested on multiple server ports.

Personal Prejudices
-------------------
From what I've seen of X11 source, I believe it will outperform NeWS
by a wide margin on machines with graphics assist. But, I've been
bitten by the NeWS bug, and no amount of performance data is going to
change my mind.  PostScript is nice to work with when developing
user interfaces. I only hope that SUN will release the combined
X-NeWS server into the public domain once it is completed.

	-greg