Trying to emulate an entire 32-bit x86 CPU on a 32-bit x86 CPU is awkward because most of it is unusable by user code; segment registers, system registers, even ESP is restricted from being freely modifiable. A 64-bit CPU has an extra 8 general purpose registers to help get the job done.
The Mp3 Lame encoder very heavily uses the dosbox FPU functions (FPU_FLD_32, FPU_FST_32), it doesn't show the difference between Intel Xeon and Core 2 (coding times under 64-bit dosbox are very similar).
However, the Dhrystone benchmark performs much better, it clearly shows the disproportions.
That's what I linked to in the edit. I found it after when looking for other people's built versions.
Edit (Oct 21)
I managed to get this to compile (VS2019), and recompiled MUNT-SVN ( >2.3.0), FluidSynth( >1.1.6-noglib), SDL2 (2.0.11-snapshot), zlib (1.2.11), libpng (1.6.38-SVN snapshot), in 64-bit in a static build.
C Preprocessor settings
Ryzen 5 2400G, DOSBox SVNr4296 built with gcc-9.2.1 on Fedora 31 x86_64, without and with the patch (had to restore the tabs the forum software converted to spaces):
Thanks. It seems the newer a CPU is, the worse performance it has for the POPF instruction (thanks a lot, speculative execution bug mitigations) so avoiding it as much as possible is a good idea.
Intel(R) Core(TM) i5 CPU M 450 @ 2.40GHz
Linux 5.4.1
dosbox-svn-r4296, gcc-4.9.4, x86_64, (the second result with the patch applied)
D1:
VAX MIPS rating: 115.27 116.38
PCBench: 70.6 75.4
quake 1.06 with sound, demo1
320x200: 102.5 107.1
800x600: 28.4 32.8
Last edited by latalante on 2019-12-06, 11:47. Edited 1 time in total.
realnc wrote:i5 2500K (Sandy Bridge). Linux 64-bit. […] Show full quote
i5 2500K (Sandy Bridge). Linux 64-bit.
Quake timedemo demo1 average of 5 runs each. cycles max, core dynamic.
Before: 105FPS.
After: 117FPS.
You could tell under what specific system you were running your binaries. Your results are unbelievably low compared to my older and much slower processor. The difference is around 9% should be at least in the range of 37-42% (if not greater). https://en.wikipedia.org/wiki/List_of_Intel_C … microprocessors
I tested the dosbox-staging version yesterday and the results were clearly lower than my build.
I upload my compilation here if anyone wants to compare. https://drive.google.com/file/d/1L12wqanCgboj … iew?usp=sharing
It was built under the new version of the C library (glibc-2.30) and requires it. Under Linux, compatibility only works up.
Downward compatibility can be maintained by starting it with loading the necessary libraries.
If you have glibc-2.30, then just run like this:
"the results".. which results - realnc's posted above your post?
"my build".. compiler, version, and optimization flags did you use?
"clearly lower".. (lower being faster? or worse? and by how much?) - can you list the actual before-and-after/A-vs-B numeric results and units for the benchmark?
Last edited by krcroft on 2019-12-10, 01:57. Edited 1 time in total.
"clearly lower".. (lower being faster? or worse? and by how much?) - can you list the actual before-and-after/A-vs-B numeric results and units for the benchmark?
Lua, pcbench, lame, quake, ...
In each of my tests the difference was quite significant, at least 5-15% and maybe more. Maybe it's a matter of my old processor.
I ran some tests and the two are roughly identical, within the noise of my system.
Can you try these steps? You can copy and paste them as-is into your shell.
Build the sources
1wget https://github.com/dreamer/dosbox-staging/archive/master.tar.gz -O - | tar -zxC /dev/shm 2wget http://source.dosbox.com/dosboxsvn.tgz -O - | tar -zxC /dev/shm 3 4for d in dosbox dosbox-staging-master; do 5 cd "/dev/shm/$d" 6 ./autogen.sh 7 export CFLAGS="-DNDEBUG -pipe -O3 -march=native -flto=$(nproc)" 8 ./configure CXXFLAGS="$CFLAGS" LDFLAGS="$CFLAGS" 9 make -j$(nproc) 10done 11
I ran:
- the landmark benchmark at 96400 DOSBox cycles (it wraps beyond that)
- the PC Player 3D benchmarks at default (low) and 640x480 resolutions
- Quake at default (low) resolution
Curious if this changes anything for you.
Oh, you can now let your processor relax 😀
1echo powersave | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor 2echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/min_perf_pct