Re: A86: a pretty fast multiply method...


[Prev][Next][Index][Thread]

Re: A86: a pretty fast multiply method...




Well if you knew so, why didn't you say so earlier, and we could have had
this all that time. But apparently I've figured it out independently, which
is just as well, because whenever you see already-made code you have an
instinct to try and port it rather than start from scratch.

Anyway, between Jimmy's optimizations and a few tweaks, looks like it's
gonna come in at about 115 cycles (including ret) with a 1280 byte table.

----- Original Message -----
From: Robin Harbron <macbeth@psw.nu>
To: <assembly-86@lists.ticalc.org>
Sent: Saturday, November 27, 1999 6:21 PM
Subject: Re: A86: a pretty fast multiply method...


> Steve Judd of Commodore 64 fame figured this out a few years ago, and
> implemented some pretty darn fast and cool routines - very decent frame
> rates, and this is at 1Mhz with a 320x200 pixel screen!
>
> This is from him:
> "Fast multiply: don't blink or you'll miss it.
>
> Let f(x) = x^2 / 4.  Then
>
>                 a*b = f(a+b) - f(a-b)
>
> Thus with a table of squares you can do integer multiplies very quickly.
> To see an implementation of this algorithm, see C=Hacking."
>
> 6502 source and binaries:
> http://www.ffd2.com/fridge/obj3d/index.html
>
> For a couple absolutely huge articles on how he did this:
> http://www.ffd2.com/fridge/chacking/c=hacking16.txt
> http://www.ffd2.com/fridge/chacking/c=hacking18.txt
>
> And while I'm at it, a bunch of great Spectrum vs. C64 vs. Z80 vs. 6502
flamewars:
> http://www.ffd2.com/fridge/speccy/
> --
> Robin Harbron     macbeth@psw.nu
>  http://www.tbaytel.net/macbeth
>        http://www.psw.nu/



Follow-Ups: References: