News for hackers. Stuff that matters.
Re:Benchmarking Malloc with Doom 3 by imron on Tuesday June 07, 2022 @11:07AM (#31655464)
> Why did the author do things this way? I must be missing something.

Likely because it's easier to test against different allocators with a small replay tool than it is to try and get Doom3 to compile against dlmalloc, jemalloc, mimalloc, rpmalloc and tlsf.

Re:Benchmarking Malloc with Doom 3 by mcronce on Tuesday June 07, 2022 @11:27AM (#31655773)
I would also bet that getting the game to perform the exact same series of allocations would be an intractable problem to solve. I don't think Doom 3 has a benchmark mode; the author just recorded themselves loading the game, loading a level, doing a bit of gameplay, etc.
Re:Benchmarking Malloc with Doom 3 by sitkack on Tuesday June 07, 2022 @12:03PM (#31656313)
Carmack is a great empiricist, meaning he pays a lot of attention to how things work in a running system. All of his engines provide rich facilities for record and replay as well as running benchmarks.

timedemo <demo file> uscache

The DOOM3 source is here https://github.com/id-Software/DOOM-3

There are lots of facilities for recording and playing back demos. The author could record their own gameplay and play it back in realtime vs running timedemo (which plays back as fast as possible).

https://github.com/id-Software/DOOM-3/blob/master/neo/framew...

    2865: cmdSystem->AddCommand( "recordDemo",  "records a demo" );
    2866: cmdSystem->AddCommand( "stopRecording", "stops demo recording" );
    2867: cmdSystem->AddCommand( "playDemo",  "plays back a demo",
    2868: cmdSystem->AddCommand( "timeDemo",  "times a demo", 
    2869: cmdSystem->AddCommand( "timeDemoQuit",  "times a demo and quits", 
https://www.youtube.com/watch?v=CLA42q3myCg

https://www.youtube.com/watch?v=9KIhRmdz2cI

Re:Benchmarking Malloc with Doom 3 by nym375 on Tuesday June 07, 2022 @12:04PM (#31656333)
> I don't think Doom 3 has a benchmark mode

id Tech games have "timedemo" mode, where they replay a pre-recorded demo as fast as possible, and report how many FPS it was able to process. These were very popular benchmarks long ago.

Re:Benchmarking Malloc with Doom 3 by mcronce on Tuesday June 07, 2022 @12:56PM (#31657128)
I stand corrected then, this would probably be a great fit