News for hackers. Stuff that matters.
Re:Don't waste money on a math coprocessor they said by mobilio on Monday November 13, 2023 @04:08AM (#38248376)
I have similar experience DX4 overclocked to 120 MHz vs. Pentium running on 75 MHz

Hint: Pentium FPU was faster

Re:Don't waste money on a math coprocessor they said by consp on Monday November 13, 2023 @05:16AM (#38248733)
My Retro-socket3-toy-unit with a P83@100 MHz is fast (40MHz bus), but the DX5x86@150mhz (50MHz bus) beats everything except in quake. Timings aren't that great for the memory but the synchronous PCI bus (and working PCI VGA card at that speed) beats everything you throw at it.
Re:Don't waste money on a math coprocessor they said by mobilio on Monday November 13, 2023 @05:43AM (#38248859)
Same here - all DOS games was faster on DX4, but Pentium was so smooth on Quake.
Re:Don't waste money on a math coprocessor they said by TerrifiedMouse on Monday November 13, 2023 @06:15AM (#38249029)
Carmack and Abrash optimized the heck out of Quake making use of a “quirk” in the Pentium where you can overlap integer operations and floating point DIV to eke out every last drop of performance.

Unfortunately the trick doesn’t work on early AMD K5/6 nor Cyrix CPUs - although Cyrix CPUs probably had other more serious problems.

https://youtu.be/DWVhIvZlytc?si=DBE9zpTLj_16-GAt

Re:Don't waste money on a math coprocessor they said by Sharlin on Monday November 13, 2023 @06:47AM (#38249189)
Yeah. Their perspective correct texture mapping did a perspective div only every 16 pixels drawn – in itself a considerable optimization with almost imperceptible loss in quality – but the big deal was that on the Pentium specifically, the integer pipeline could be almost perfectly cycle-optimized to process sixteen pixels in the time the FPU executed the next perspective division in parallel so the result was ready just as it was needed!
Re:Don't waste money on a math coprocessor they said by touisteur on Monday November 13, 2023 @07:53AM (#38249593)
More on this in the Black Book graphic shttps://news.ycombinator.com/item?id=35738709 . Programming on Pentium is towards the end.
Re:Don't waste money on a math coprocessor they said by rasz on Tuesday November 14, 2023 @02:05AM (#38260018)
K5/Cyrix could overlap Integer and FPU operations, what they couldnt do was interleave (pipeline) FPU operations so that multiple floating point instructions ran in parallel.

https://www.phatcode.net/res/224/files/html/ch63/63-02.html

Here a non perspective correction related Quake FPU code example https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac...

    Lcliploop:
     fld ds:dword ptr[0+0+esi]
     fmul ds:dword ptr[0+0+ebx]
     fld ds:dword ptr[0+4+esi]
     fmul ds:dword ptr[0+4+ebx]
     fld ds:dword ptr[0+8+esi]
     fmul ds:dword ptr[0+8+ebx]
     fxch st(1)
     faddp st(2),st(0)
     fld ds:dword ptr[0+0+edx]
     fmul ds:dword ptr[0+0+ebx]
     fld ds:dword ptr[0+4+edx]
     fmul ds:dword ptr[0+4+ebx]
     fld ds:dword ptr[0+8+edx]
     fmul ds:dword ptr[0+8+ebx]
     fxch st(1)
     faddp st(2),st(0)
     fxch st(3)
     faddp st(2),st(0)
     faddp st(2),st(0)
     fsub ds:dword ptr[12+ebx]
     fxch st(1)
     fsub ds:dword ptr[12+ebx]
     fxch st(1)
     fstp ds:dword ptr[Ld0]
     fstp ds:dword ptr[Ld1]

FXCH instruction is free (zero cycles) on Pentium for most instruction combinations, AMD caught up in late 1998 with CXT revision K6-2. http://www.azillionmonkeys.com/qed/cpuwar.html
Re:Don't waste money on a math coprocessor they said by _the_inflator on Monday November 13, 2023 @05:25AM (#38248772)
Pentium was very significant in comparison to predecessors. In the beginning Intel shipped a Pentium 66 and it smoked the 486 DX 100 easily.

We kind of marveled back then because MHz meant speed.

Re:Don't waste money on a math coprocessor they said by vikingerik on Monday November 13, 2023 @12:52PM (#38252976)
Part of that was the bus and memory speed as well. The 486 bus ran at 33 MHz (the "DX4" is actually only clock-tripled to 100), while the Pentium bus and memory ran at 66.
Re:Don't waste money on a math coprocessor they said by _the_inflator on Monday November 13, 2023 @01:58PM (#38253767)
Yes, I know. Setting the jumpers for the right bus speed for the multiplication was key. This was the time of the fine tuning and over clocking. Asus boards were the best for this job back then.

Some Pentium ran at 60, not 66.

Re:Don't waste money on a math coprocessor they said by hurryer on Monday November 13, 2023 @05:26AM (#38248779)
Pentium was the first CPU which could run two integer operations per cycle.
Re:Don't waste money on a math coprocessor they said by mobilio on Monday November 13, 2023 @05:33AM (#38248806)
I remember that - U pipe and V pipe.

And that's why it's first x86 that was superscalar.

Re:Don't waste money on a math coprocessor they said by johnklos on Monday November 13, 2023 @02:23PM (#38254101)
It wasn't the first CPU that was superscalar by far, but it was the first x86 CPU that was superscalar.
Re:Don't waste money on a math coprocessor they said by pak9rabid on Monday November 13, 2023 @11:54AM (#38252307)
Yep. The P5 arch (original Pentium) superscalar design, combined with its much faster FPU and separation of data and code caches meant it could run circles around a 486-based CPU, even if it was running up to twice the speed of a 486 contender.
Re:Don't waste money on a math coprocessor they said by mrlonglong on Monday November 13, 2023 @05:36PM (#38256328)
I had a dual Pentium Pro 166Mhz w/512kb caches running on a Tyan mobo. That thing was fast under Linux.

EDIT: Present day, rocking a thread ripper with 48 logical cores. Still running Linux.