This is probably a stupid question combined with my faulty memory playing tricks on me.
For fun, I created a stupid little thing in DJGPP (v2.03) on 86box, emulating a 25 MHz 486 SX - no FPU - just like a machine I had years ago. Because the machine, real and virtual, has no FPU, DJGPP uses a floating point emulation library (emu387.dxe/libemu.a).
Here's the issue: I know that FP emulation is slow, but something's not right. I just timed my SIN/COS table generating code, and it's taking 2.78 seconds to generate the tables using FPU emulation. For a loop of 360 degrees and that seems like a stupidly long amount of time, even for FPU emulation on a 25 MHz 486. So, just for giggles, I wrote the same SIN/COS table generating code in Turbo Pascal 6.0 and generated the tables nearly instantly (and I confirmed the approximate values were good enough for what I was doing). This seems really weird to me and I don't recall there being this much of a performance hit when I used DJGPP 2.03 on my old 486 back in the day (this could also be a potentially faulty memory on my part... I'm getting old).
It could be 86box is causing a problem here, but I would have expected the TP6 code to be affected by it too (obviously, it could still be a quirk in the emulator - different compiler tech and all).
Would anyone have any insight into this? Am I just remembering incorrectly and it's always been this slow?
For fun, I created a stupid little thing in DJGPP (v2.03) on 86box, emulating a 25 MHz 486 SX - no FPU - just like a machine I had years ago. Because the machine, real and virtual, has no FPU, DJGPP uses a floating point emulation library (emu387.dxe/libemu.a).
Here's the issue: I know that FP emulation is slow, but something's not right. I just timed my SIN/COS table generating code, and it's taking 2.78 seconds to generate the tables using FPU emulation. For a loop of 360 degrees and that seems like a stupidly long amount of time, even for FPU emulation on a 25 MHz 486. So, just for giggles, I wrote the same SIN/COS table generating code in Turbo Pascal 6.0 and generated the tables nearly instantly (and I confirmed the approximate values were good enough for what I was doing). This seems really weird to me and I don't recall there being this much of a performance hit when I used DJGPP 2.03 on my old 486 back in the day (this could also be a potentially faulty memory on my part... I'm getting old).
It could be 86box is causing a problem here, but I would have expected the TP6 code to be affected by it too (obviously, it could still be a quirk in the emulator - different compiler tech and all).
Would anyone have any insight into this? Am I just remembering incorrectly and it's always been this slow?
Last edited: