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_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28444 invoked from network); 13 Dec 2022 14:08:30 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 13 Dec 2022 14:08:30 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id CEC9E41C64; Wed, 14 Dec 2022 00:08:23 +1000 (AEST) Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) by minnie.tuhs.org (Postfix) with ESMTPS id 67AF141C54 for ; Wed, 14 Dec 2022 00:08:19 +1000 (AEST) Received: by mail-vs1-f50.google.com with SMTP id i2so14711827vsc.1 for ; Tue, 13 Dec 2022 06:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dartmouth.edu; s=google1; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jKojq6nJIHbuYacyOfJSbLLEDONp/OLxMca5NQbZSgI=; b=r1SideT5k7ctElT2HclyjA4lWZDP1Z25WANq+3J2uBxxcLKDDkZEq61gA0aSuraT/Y Sf7Wq+s2kyQ18kR9l4vQ9Ol+0lDA3udECNDa1zo9+bRbE2QPsYaLP39SixSbmaY+j/Bn WTMqMW2/jUa/ohixaB+3hTS0wT46nXV/TDO2s5EarzhARitgHtv1WW+6IGFIyKfQQNQB 4qnDnw3Senm43H/Z8MUvxi7LCxlE82sT9XWM4P3o3hnHKo9Ot3JbxI04egje1nYDzc1e 43Gx3M2HjWVE9mOnrSd+S9WPqLIL0EJ2594+8l79BYanGQFBNcUPcKfVHF9B4j4Gpd9j Et5Q== 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=jKojq6nJIHbuYacyOfJSbLLEDONp/OLxMca5NQbZSgI=; b=bspbccAvW+DGX7Doehk/xrQsTWqhm/DvRIO7PAbRtfTaaHqDLCjFXnD5P4b5BGbcwP WdBjebKju4t0l6ziCVjcThz0zU4G/UREgQkrVQL4EZyrGBVQIC38kiMsBDEMGMDeEhcI XnU3RikxCwQJohqByASMZJ4XFaWCt+w0YY69MUKtQF3gEynJ7a+2ETLEWsM154mg+BV3 6nNwimArah2juTg1VDiHmSuFExPjy8Ns5Uh/yXI2sCRTM2ixoMtR2cDo4zqDw6pbK6ZC kc+Fj0QPsQlZ9d+XPMIu3VbwJeTer8zgFAL/olqOsbA/+JKKA3sySdFw1Vo2awWA0upn 6fmQ== X-Gm-Message-State: ANoB5pkNepbp2K8QdUOR1bT+ELed+pVxuDCg5dLXlM6vEeAgVe5OWAP7 8ajIpr/64DawSEMA8Hgdywl0us5YhplNK/IFarohV8k+ix1pfOhx X-Google-Smtp-Source: AA0mqf7cpN6FwBXT7Ykzb+u00LRdCAECxhGltA7thkbiGlyxSYt5v16ABjRZGH+bHo+hX2+ZyS06r34gQOCWIU3KbvY= X-Received: by 2002:a05:6102:3164:b0:3b5:fd8:7948 with SMTP id l4-20020a056102316400b003b50fd87948mr775733vsm.85.1670940438408; Tue, 13 Dec 2022 06:07:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Douglas McIlroy Date: Tue, 13 Dec 2022 09:07:02 -0500 Message-ID: To: "John P. Linderman" Content-Type: text/plain; charset="UTF-8" Message-ID-Hash: 563LBKHVLJ6BBAXV6S7F5SBC3FDCIVRC X-Message-ID-Hash: 563LBKHVLJ6BBAXV6S7F5SBC3FDCIVRC X-MailFrom: douglas.mcilroy@dartmouth.edu 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: Apropos of accessing rotating storage, John Kelly used to describe the Packard-Bell 250, which had a delay-line memory, as a machine where addresses refer to time rather than space. The PB 250 had two instruction-sequencing modes. In one mode, each instruction included the address of its successor. In the other mode, whatever popped out the delay line when the current instruction completed would be executed next. Doug On Tue, Dec 13, 2022 at 6:48 AM John P. Linderman wrote: > > 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