In game testing was to be my next series of test. Continuing from where I left off in my last post.
I copied 2 different fortress games from 40d. Both are pocket worlds generated with 40d, and have various amounts of play on them. I end each test by using task manager to kill the active DF version, and then reset the save data from a clean backup.
Set MOUSE:NO
Set PAUSE_ON_LOAD:YES
Set TEMPERATURE:NO
Set WEATHER:NO
Set INVADERS:NO
Set SHOW_FLOW_AMOUNTS:YES
Test 10:
Load game "a game"
Watch it paused
40d7: FPS 2200-2300, with odd spikes as low as 1900 and highs of 5000. This spikes are a tiny flicker, but they with a periodic consistency of every 2 seconds. Processor usage 60% memory 84Mb
40d: FPS 1975, 2011-2050. The 1975 number tends to be consistent for periods of 2 seconds, then the FPS moves through the 2000 range breifly then returns to 1975. Processor usage 10 - 20% with the same pattern as the FPS. memory 79Mb.
Press z
40d7: FPS 300-360, processor 100%
40d: FPS 370-386, processor 100%
Press space
Press tab until menu is gone
40d7: FPS 2380-2480, processor 70%
40d: FPS 1975, with fluctution like above, processor 10-20% but holds more on the 20%
Move display to completely unrevealed area
40d7: FPS 1900-2000 processor 50-60%, the CPU numbers look like 40d behavior here
40d: FPS 1975, almost flat minor spiking, processor 0-10% mostly holding at 10%
Test 11:
Load "main"
Watch it paused
40d7: FPS 2800-2900, similar spiking, and I even saw it jump to the 10K range once. Processor 70%, memory 72Mb
40d: FPS identical to test 10. Processor 20%-30% same behavior as test 10, memory 65Mb
Press z
40d7: FPS 345-363, processor 100%
40d: FPS 350-383, processor 100%
Press space
Press tab until menu gone
40d7: FPS 2800-2900, processor 67-71%
40d: FPS 1975, with small fluctuations into 2000's, processor 20-30% mostly hanging at 30%
Move to unrevealed area
40d7: FPS 2100 range, processor 60% with occasional drops as low as 50%
40d: FPS 1975 with small fluctuations into 2000's, processor 10-20% mostly hanging at 10%
These tests are all with the game paused so we shouldn't be looking at pathfinding, flow calculations, or any real dwarf activity.
I did check a few other views such as the units, jobs, and options screens, they all resulted in FPS numbers like the stocks screen. This indicates there is something Toady really needs to optomize with these views. These numbers are the same as my main menu results below. This indicates that the problem with these views is not affected by whether a save is loaded.
Looking over all the numbers from a more statistical standpoint we see a processor usage that is consitently 3 times higher with 40d7 then 40d. The best FPS gain was 50%, with an average gain of 20%. Using that much more processor for such a small gain is a less then optimal result. An optimal result would be 3x processor nearly equals 3x FPS.
Of course neither version reached the FPS_CAP of 10K that I had set, and this is likely because of the Windows Sleep inaccuracy. The code in 40d7 is definitely pushing more FPS through, and making greater utilization of my system. It comes closer to doing what I have asked it to do, and the only reason I am aiming for such maximum numbers is limit testing. Working with a more reasonable limit would likely show 40d superior due to its already more optimal code, and lower memory footprint.
I can move on to actually unpausing the game if anyone feels it is needed for comparative purposes.