Closed SpiritQuaddicted closed 10 years ago
For a demo with ~1400 Spawns/Torches on marcher the differences are even lower. No difference at all for the pentium4 binary, ~1% for the pentium one. Difference between same options but pentium4 vs pentium are ~8%.
I am on a i5 CPU.
Safe is good. :-)
FWIW, the Visual Studio project also builds a 32-bit (x86) executable. No unusual compiler options, just /O2 (to make tradeoffs for speed instead of for smaller executable). Using the Windows build I don't see the lightmap problems that you saw in the jam1 maps.
P.S. It's fine to remove -funroll-loops in the Linux options, but I don't think that could cause any functionality differences. It should just be trading off executable size to gain speed. (Might not make any speed difference in practice.)
There was some discussion about the makefile in http://forums.inside3d.com/viewtopic.php?f=3&t=5488
I am now making it the safer choice after I derped around for an hour wondering what was broken, only to realise we still had the offending stuff inside...
I needed to add "CFLAGS += -m32" and to the linker options "-ldl -m32" to get it to compile on my 64 bit system. I have no idea if I should add those permanently or not.
ffast-math could be removed to avoid the lightmap corruption issues. I did some totally unscientific bigass1.dem benchmarking which gave me a 2% performance loss when using "-march=pentium" and ~9% for "-march=pentium4 -msse -mfpmath=sse" with "-ffast-math" being removed. Both with framerates above 1000 fps, so not really something significant.
szo said "AFAICS, the -funsigned-char, -funroll-loops and -fno-strength-reduce switches can be safely removed."
I would say easier and safer compiling beats performance gained by special compiler flags. There is probably way more potential for performance improvement within the engine itself.