🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.arch
Article #2562

Re: C as an aid writing assembler

#2562
From: Griff Smith
Date: Thu, 19 Jun 1986 00:54
35 lines
2140 bytes
[deleted fine, clear comments about the importance of type checking]

> Decent high-level languages ...
> ... can also optimize the code better -- most hand-written
> assembler is not highly optimized, because it's too much work for a human.

Most UNIX system hand-written assembly language is suboptimal because
the programmers haven't learned the coding idioms and/or don't give a
damn.  Humans can do a fine job of optimizing assembly language; they
are much better at recognizing special case optimizations that are too
expensive/unlikely to put in an optimizer.  My code, when it worked,
was tight and more optimized than I have seen in most compilers.  What
usually made my assembly code sub-optimal was the need for
parameterization: I had to MOV a parameterized zero into a register
instead of CLRing it, etc.

I will completely support a paraphrase of Henry's quote: most hand-written
assembler code is incorrect; finding all the inconsistencies is too much
work for a human.  I once spent three days finding a "character with a 3
in it" when I intended to declare an "array of 3 characters".  Lint would
have found it in 30 seconds.

> -- 
> Usenet(n): AT&T scheme to earn
> revenue from otherwise-unused	Henry Spencer @ U of Toronto Zoology
> late-night phone capacity.	{allegra,ihnp4,decvax,pyramid}!utzoo!henry

Keep that revenue coming, folks.  Thank you for using AT&T.

-- 

Griff Smith	AT&T (Bell Laboratories), Murray Hill
Phone:		(201) 582-7736
UUCP:		{allegra|ihnp4}!ulysses!ggs
Internet:	ggs@ulysses.uucp
Technical Details
Message-ID: <1303@ulysses.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ggs
References: <201@pyuxv.UUCP> <3700003@uiucdcsp> <6814@utzoo.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site ulysses.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ggs
From: ggs@ulysses.UUCP (Griff Smith)
Newsgroups: net.arch,net.lang
Subject: Re: C as an aid writing assembler
Message-ID: <1303@ulysses.UUCP>
Date: Wed, 18-Jun-86 20:54:12 EDT
Article-I.D.: ulysses.1303
Posted: Wed Jun 18 20:54:12 1986
Date-Received: Thu, 19-Jun-86 19:56:52 EDT
References: <201@pyuxv.UUCP> <3700003@uiucdcsp> <6814@utzoo.UUCP>
Organization: AT&T Bell Laboratories, Murray Hill
Lines: 35