Standard Def Steve wrote:All this talk about using integer based decoding to make MP3s playable on 486/early Pentium really makes you appreciate the P6 FPU, eh?
Or not... 😀
Apparently because FPUs have become so efficient in recent years, it is difficult for people to get their heads around the idea that an FPU was not necessarily the fastest way to get something done in the old days.
An FPU is good at working with floating point numbers. But these tend to be relatively large numbers, so they require quite a bit of bandwidth and 'oomph'. The smallest possible data any x87 FPU can handle is 32-bit (single-precision IEEE754). Even on machines that have an 8-bit or 16-bit bus. How is that ever going to be fast?
Not to mention that the IEEE754 standard also states strict rounding and renormalization rules after every operation. This was quite processor-intensive back in the day.
So in the old days, you used an FPU only when you absolutely had to. Whenever you could simplify/approximate the mathematics to integer logic, preferably with less precision, it was a huge win.
Quake is the turning point there, in terms of games. Before Quake, hardly any 3D game ever even bothered to make use of the FPU. Quake made it painfully obvious why: it dies on anything less than a Pentium.
FPUs were meant for high-precision scientific calculations, not for anything realtime.
It would be interesting to see what you could do with an mp3 decoder that is entirely tuned for integer performance, possibly even restricted to 16-bit maths only (I optimized a JPG decoder for that once, to run on a Canon PowerShot camera, which contained an 80186-compatible CPU running ROMDOS), and possibly taking some shortcuts, like reducing sample rate and decoding in mono.
I'm pretty sure even a 386 should be able to play *some* kind of mp3, even if it would only be 64kbit mono at 16 kHz or whatever. But it would be quite a challenging project to get there.