From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11091 invoked from network); 13 Dec 2022 11:48:43 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 13 Dec 2022 11:48:43 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id EF618423AF; Tue, 13 Dec 2022 21:48:06 +1000 (AEST) Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by minnie.tuhs.org (Postfix) with ESMTPS id EA15E423AA for ; Tue, 13 Dec 2022 21:48:01 +1000 (AEST) Received: by mail-yb1-f181.google.com with SMTP id s11so17263731ybe.2 for ; Tue, 13 Dec 2022 03:48:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RHHOD/jpKXom35yRIl6lGnLa7nOTCVm+iswcv5mRVv8=; b=jI7yeyEYQ5o0bm/pOoR9tjgi4DsB/0EY37RxnIPnn3fbJXkC6i/u9dvn7b0ByVy3Gr R4bE04BfPbA5PAQC4+WQcHZ7HFgwEyFJIyvsfjoAN7HHSo6qVGlDhkkFBEhOk1uxe1m2 jFzpS8LcTuJ05cUv7cVZlrhGwSdyLHhmuH/CTYRaWhmFjY7+iCbj0Voi/vDwsfCtS/o0 y2PfXH9U/j07pO8I3Pc8ms+b8qvi3guIDYD0d3vfzef3vlGreMSj98KaB1bxFa57nX7v DeXRgtNxuh6GbSBEZttndv4rwyrZ7Axb1g5h8k3rTgVhQ9+kfccVB+168/3i/Ol+/T1I lOUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RHHOD/jpKXom35yRIl6lGnLa7nOTCVm+iswcv5mRVv8=; b=I5cCgy/zfrIm4HJ8fxqCS7zd8Uy4mwyR4NmZicbs/1bmoeSOwGADK7n4jAvpB2oVTS vpCF7IQcZFK25k+XS0j7Kh17dyj5SYgOigxH+htO+kkgMTFCfoaPj7IyjZE0DYEaRKYS hbIdDNE1NOwW0QA4cdEKokBzM9TX8wWwPqDKb/YSqvo1G1fWWuNvnfHbCEmwlqV2tN5t gMkE6eGWgc0nybRqkEnuq2oIDcttM9mzOZLQ4J2S8N4PnO1Vd5k+0i9N3lmBZWX0N/j9 DoLKXmgfPFMM+F3ZRDG01FWbKc47zbATJ1Fu/5nmNspftM6vLpSDZr3b9eyiFS6ERE72 9O+g== X-Gm-Message-State: ANoB5pmaWo0D/sTIta0pFNaxtscLRD/wv7YJmU+AIR+7mXHMru1DkJp5 ua6iXptAky+n1p+z/+B3X8EXt7ak9GPV33Dar3KAtGuO X-Google-Smtp-Source: AA0mqf5/dF21tk50P/5tO2yhkTv9ET/U7baphlAsVd9VDrTjXHj0E1tHC2UVir0Bu/zU3+CO6uvlcYHxaNWlwqkdXM4= X-Received: by 2002:a05:6902:38c:b0:724:6d18:6dff with SMTP id f12-20020a056902038c00b007246d186dffmr951482ybs.529.1670932020886; Tue, 13 Dec 2022 03:47:00 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "John P. Linderman" Date: Tue, 13 Dec 2022 06:46:49 -0500 Message-ID: To: Dave Horsfall Content-Type: multipart/alternative; boundary="0000000000008c821205efb42df4" Message-ID-Hash: AUJVYTM2M6X2HH745ZKVC42GYZOSFKQM X-Message-ID-Hash: AUJVYTM2M6X2HH745ZKVC42GYZOSFKQM X-MailFrom: jpl.jpl@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: The Eunuchs Hysterical Society X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: Clever code List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000008c821205efb42df4 Content-Type: text/plain; charset="UTF-8" There was a story that old hands would torment newcomers to the IBM 650 by tinkering with the optimizer to make it as slow as possible (and, with rotating drums, that could be VERY slow). Then they'd look at the newcomer's code, make a trivial change, run it with the real optimizer, and get dazzling improvements. I also recall punched card bootstrap programs for the IBM 7094 that would load column binary when run column binary, and load row binary when run row binary. -- jpl On Mon, Dec 12, 2022 at 10:53 PM Dave Horsfall wrote: > On Tue, 13 Dec 2022, Rudi Blom wrote: > > > I vaguely remember having read here about 'clever code' which took into > > account the time a magnetic drum needed to rotate in order to optimise > > access. > > Sounds like you're referring to SOAP (Symbolic Optimal Assembly Program) > on the IBM 650; the programmer wrote the code "straight down" and SOAP > reordered it for rotational latency. > > > Similarly I can imagine that with resource restraints you sometimes need > to > > be clever in order to get your program to fit. Of course, any such > > cleverness needs extra documentation. > > Try writing a bootstrap program in 512 bytes :-) Self-modifying code was > the order of the day... > > > I only ever programmed in user space but even then without lots of > comment > > in my code I may already start wondering what I did after only a few > months > > past. > > You could be clever in kernel space too, such as taking advantage of > the DATIP/DATO cycles on DEC's Unibus when updating a memory word i.e. > read/modify/write. > > -- Dave --0000000000008c821205efb42df4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The= re was a story that old hands would torment newcomers to the IBM 650
<= div class=3D"gmail_default" style=3D"font-size:small">by tinkering with the= optimizer to make it as slow as possible (and, with
rotating drums, that could be VERY sl= ow). Then they'd look at the
newcomer's code, make a trivial change, run it with t= he real optimizer,
and get dazzling improvements.

I also recall punched card bootstrap programs for the IBM 7094 t= hat
would load = column binary when run column binary, and load row binary
when run row binary. -- jpl

On Mon, Dec 12, 2022 at 10:53 PM Dave Horsfall <dave@horsfall.org> wrote:
On Tue, 13 Dec 2022, Rudi Blom wrote:

> I vaguely remember having read here about 'clever code' which = took into
> account the time a magnetic drum needed to rotate in order to optimise=
> access.

Sounds like you're referring to SOAP (Symbolic Optimal Assembly Program= )
on the IBM 650; the programmer wrote the code "straight down" and= SOAP
reordered it for rotational latency.

> Similarly I can imagine that with resource restraints you sometimes ne= ed to
> be clever in order to get your program to fit. Of course, any such
> cleverness needs extra documentation.

Try writing a bootstrap program in 512 bytes :-)=C2=A0 Self-modifying code = was
the order of the day...

> I only ever programmed in user space but even then without=C2=A0lots o= f comment
> in my code I may already start wondering what I did after only a few m= onths
> past.

You could be clever in kernel space too, such as taking advantage of
the DATIP/DATO cycles on DEC's Unibus when updating a memory word i.e. =
read/modify/write.

-- Dave
--0000000000008c821205efb42df4--