VOGONS

Common searches


First post, by TeaRex

User metadata
Rank Member
Rank
Member

Hi guys, I just tried compiling DOSBox (on Ubuntu) with GCC 4.5.1 instead of GCC 4.4.4, and surprise surprise, I got a pretty high speed gain.

DOOM's "doom -timedemo demo1" (SB sound, Keyboard+Mouse input, one level of border) went down from ca. 5060 to ca. 3900 "realticks", as they call it, on normal core with cycles=max. On dynamic x86 core, the gain was of course not so high, but I still went from roughly 1600 to about 1450. I have a Core2Quad running at 3188 MHz by the way.

On the other hand, the new -flto whole-program-optimization option of GCC 4.5 didn't help at all, with it DOSBox actually became slightly slower on normal core (3970 cycles) and stayed the same on dynamic. Plus you have to tweak the code a bit to even use it, because you get multiple definition errors for some assembly code labels (since fpu_instructions_x86.h contains labels in inline assembly code and it is included twice).

This is just so you speed junkies know that compiling the code yourself can be pretty helpful. On Windows, VC++ Express 2010 also gave a nice speed boost that I already posted about some time ago. In fact the VC++ binary running on Windows 7 is still slightly faster than the GCC 4.5.1 compiled version running on Ubuntu on the same machine, but the difference is certainly not as large as with GCC 4.4.4.

tearex