• The old college try (was: Re: Bad faith and dishonesty)

    From vallor@21:1/5 to All on Fri May 30 09:56:06 2025
    On Fri, 30 May 2025 10:14:53 +0100, Richard Heathfield <rjh@cpax.org.uk>
    wrote in <101bsud$de5t$1@dont-email.me>:

    On 30/05/2025 10:03, Mikko wrote:
    On 2025-05-29 16:42:09 +0000, olcott said:

    <snip>

    We must achieve 100% complete closure on each point one-at-a-time and
    not endlessly flit back and forth across many different points never
    achieving closure on any of them.

    You are not and never have been asked to endlessly flit back and forth.
    But you are doing it anyway. You have been adviced how to to something
    more useful but you have never done.


    Quite so. At some point, one must draw a veil across the nonsense. I
    think I've reached that point. I do not plan to reply to any more of Mr Olcott's articles. (Road to hell and that, but that's the plan.)

    It's like jousting windmills.

    You posted in good faith, and explained it to him...only
    to have him ignore your multi-point refutations. (By his
    own admission -- he says he only answers the first point.)

    Olcott isn't an honest correspondent. The value I see in this
    'froup has been reading the responses.

    * * *

    However: I actually had an on-topic post about
    time-for-space, a term I learned from ChatGPT by
    describing the pre-computing of values to save time
    to the little beasty.

    In the case I gave it, O(n) becomes O(1). It was
    a "trick" I figured out on the Commodore PET in
    the 80's: using the numeric keypad as an index
    for arrays to add x/y values to compute a player's
    movement in a rudimentary game I wrote. (In BASIC,
    I'm ashamed to say. ;) The array computation replaced
    a bunch of if-then statements, and it ran a lot faster
    after that.

    Anyway, after that learning experience, I always knew about
    the principle, (trading space for time) but didn't know what
    it was called, even though it has showed up over and over again.
    ChatGPT set me straight on what to call it.

    Another example: I once wrote a library to cache /etc/passwd
    and /etc/shadow in memory to speed up our RADIUS server's getpwnam()
    and getspnam() calls, trading RAM space for decreased time to look
    up entries. (In the mid-90's, this was a big deal. Wouldn't be
    much of a deal today with the "db" lookups that can be used through nsswitch.conf(5) ).

    --
    -v

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to vallor on Fri May 30 12:05:54 2025
    On 30/05/2025 10:56, vallor wrote:
    In the case I gave it, O(n) becomes O(1). It was
    a "trick" I figured out on the Commodore PET in
    the 80's: using the numeric keypad as an index
    for arrays to add x/y values to compute a player's
    movement in a rudimentary game I wrote. (In BASIC,
    I'm ashamed to say. ;) The array computation replaced
    a bunch of if-then statements, and it ran a lot faster
    after that.

    The time: 1989.

    The date: Atari ST.

    The program: ballistics.

    Potential problem: trig functions are slow, right?

    The optimisation: pre-calculate sine, cosine, and tangent lookup
    tables at the start of the program.

    The result: slow to initialise, but acceptable speed thereafter.

    The upgrade: remove the lookup table calcs and just call sin, cos
    etc when needed.

    The result: blitzingly fast.

    The lesson: premature optimisation is the root of all evil.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)