🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #14374

Experience with fast screen refresh routines

#14374
From: elwell
Date: Mon, 09 Feb 1987 05:14
33 lines
2190 bytes
Sometimes you don't know what you've got until you try to improve on it...

I thought I'd share the following somewhat annoying experience with any other
"speed freaks" out there in netland:

I thought it would be nice to have a terminal emulator that could keep up at
38.4K baud without handshaking.  So, I sat down with my 68000 databook and my
trusty HP-41CX (to count cycles with, of course), and wrote a carefully
optimized piece of assembly code to update a 26x80 screen in Monaco 9.  I
preshifted all of the character images, avoided multiplies, moved invariants
out of loops, kept everything in registers, ... you get the idea.  And, not
suprisingly, it's fast.  It can update a full 26x80 screen in 13 clock ticks
(that translates to about 86Kbaud), and it only takes 45K extra for the
preshifted character images (aw, who uses 128K macs anymore? :-)).  So far
so good.  The disappointment came when I benchmarked it against the standard
QuickDraw text routines (you know, the one that go through the font manager).
They can update a full 26x80 screen in 19 ticks.  This means that all my
careful optimization only gained my about 15-20%, which is hardly worth it
for the extra memory eaten up.  When I did the shifting on the fly, it took
17 ticks.  There are two morals of this story:

1. The sluggish performance of most terminal emulators is NOT due to QuickDraw,
   but to bottlenecks elsewhere, and

2. Never underestimate the power of the ROM.

Sigh.
-- 
====================
Total Nuclear Annihilation:				Clayton Elwell
The Ultimate Error Message.			Elwell@Ohio-State.ARPA
					   ...!cbosgd!osu-eddie!elwell
====================
Technical Details
Message-ID: <3076@osu-eddie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!osu-eddie!elwell

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!osu-eddie!elwell
From: elwell@osu-eddie.UUCP
Newsgroups: comp.sys.mac
Subject: Experience with fast screen refresh routines
Message-ID: <3076@osu-eddie.UUCP>
Date: Mon, 9-Feb-87 00:14:37 EST
Article-I.D.: osu-eddi.3076
Posted: Mon Feb  9 00:14:37 1987
Date-Received: Tue, 10-Feb-87 02:28:40 EST
Reply-To: elwell@osu-eddie.UUCP (Clayton M. Elwell)
Organization: The Ohio State University, CIS Dept.
Lines: 33