Skip to content(if available)orjump to list(if available)

Why FastDoom Is Fast

Why FastDoom Is Fast

39 comments

·March 4, 2025

gwern

> The MPV patch of v0.1 is without a doubt build 36 (e16bab8). The "Cripy optimization" turns status bar percentage rendering into a noop if they have not changed. This prevents rendering to a scrap buffer and blitting to the screen for a total of 2 fps boost. At first I could not believe it. I assume my toolchain had a bug. But cherry-picking this patch on PCDOOMv2 confirmed the tremendous speed gain.

Good example of how the bottlenecks are often not where you think they are, and why you have to profile & measure (which I assume Viti95 did in order to find that speedup so early on). The status bar percentage?! Maybe there's something about the Doom arch which makes that relatively obvious to experts, but I certainly would've never guessed that was a bottleneck a priori.

robocat

Example: "Our app was mysteriously using 60% CPU and 25% GPU. It turned out this was due to a tiny CSS animation [of an equaliser icon]"

https://www.granola.ai/blog/dont-animate-height

pinoy420

[dead]

yjftsjthsd-h

> To get the big picture of performance evolution over time, I downloaded all 52 releases of fastDOOM, PCDOOMv2, and the original DOOM.EXE, wrote a go program to generate a RUN.BAT running -timedemo demo1 on all of them, and mounted it all with mTCP's NETDRIVE.

I'm probably not the real target audience here, but that looked interesting; I didn't think there were good storage-over-network options that far back. A little searching turns up https://www.brutman.com/mTCP/mTCP_NetDrive.html - that's really cool:)

> NetDrive is a DOS device driver that allows you to access a remote disk image hosted by another machine as though it was a local device with an assigned drive letter. The remote disk image can be a floppy disk image or a hard drive image.

jandrese

> I didn't think there were good storage-over-network options that far back.

Back in school in the early 90s we had one computer lab where around 25 Mac Plus machines were daisy chained via AppleTalk to a Mac II. All of the Plus machines mounted their filesystem from the Mac II. It was painfully slow, students lost 5-10 minutes at the start of class trying to get the word processor started. Heck, the Xerox Altos also used network mounts for their drives.

If you have networking the first thing someone wants to do is copy files, and the most ergonomic way is to make it look just like a local filesystem.

DOS was a bit behind the curve because there was no networking built-in, so you had to do a lot of the legwork yourself.

ben7799

There was already relatively deep penetration of this stuff in the corporate world and universities way back in the early 1990s.

Where I want to school we had AFS. You could sit down at any Unix workstation and login and it looked like your personal machine. Your entire desktop & file environment was there and the environment automatically pointed all your paths at the correct binaries for that machine. (While we were there I remember using Sun, IBM, and SGI workstations in this environment.)

When Windows came on campus it felt like the stone ages as none of this stuff worked and SMB was horrible in comparison.

These days it feels like distributed file systems are used less and less in lieu of having to upload everything to various web based cloud systems.

In some ways it feels like everything has become less and less friendly with the loss of desktop apps in favor of everything in the browser.

I guess I do use OneDrive, but it doesn't seem particularly good, even compared to 1990s options.

aaronbaugher

I was using HP Apollo systems with the Aegis OS in the early 90s, and they basically shared one filesystem across their token-ring network. Plug in two or more systems, login to one of them, and each other system's files would be under //othersystem.

I don't recall whether there were any security-minded limits you could put on what was shared, but for a team that was meant to share everything, it was pretty handy.

leshokunin

I’m curious: were there NAS’ or WebDAV mount in the DOS era? Obviously there was FTP and telnet and such. Just curious if remote mounts was a thing, or if the low bandwidth made it impossible

sedatk

Yes, there was Novell Netware that let you mount remote drives, and there were even file locking APIs in DOS to organize simultaneous access to files. In fact, DOOM's multiplayer code relied on part of Novell Netware stack (IPXODI and LSL). The remote mounts were mainly used on LANs though, not over Internet.

bombcar

Yes, it's basically what Netware was, and Novell was a HUGE company.

SMB (samba) is also from the DOS era. Most people only know of it from Windows, though.

There were various other ways to make network "drives" as the DOS drive interface was very simplistic and easy to grab onto.

It was rare to find this stuff until Win95 make network connections "free" (before then, you had to buy the networking hardware and often the software, separately!).

roywashere

In the 90s my student union ran a computer network mainly for gaming with DOS PCs and netware running on a Linux server with MARS. This was before they had internet access but it was great for lan gaming: command & conquer, doom, or quake. All games were started from network mounts. Fun times.

diet_mtn_dew

A network redirector interface (for 'redirecting' local resource access over a network) was added at least by DOS 3.1 in 1985, possibly earlier in 3.0 (1984)

[1] https://www.os2museum.com/wp/redirectors-and-dos-3-0/

ndegruchy

The linked GitHub thread with Ken Silverman is gold. Watching the FastDOOM author and Ken work through the finer points of arcane 486 register and clock cycle efficiencies is amazing.

Glad to see someone making sure that Doom still gets performance improvements :D

kridsdale1

I haven’t thought of KenS in ages but back in the 90s I was super active in the Duke3D modding scene. Scripting it was literally my first “coding”.

So in a way, I owe my whole career and fortune to KenS. Cool.

nurettin

His blog was the first page I "surfed". Talking about duke3d map editor and his big project using voxels.

sedatk

If the author reads this: John Carmack's last name was mistyped as "Carnmack" throughout the document.

fabiensanglard

Thank you for taking the time to report it. It has now been fixed.

mkl

Another typo s/game/gave/: "Another reason John game me".

kingds

> I was resigned to playing under Ibuprofen until I heard of fastDOOM

i don't get the ibuprofen reference ?

kencausey

Guess: headache from low frame rate?

fabiensanglard

Indeed.

apetresc

I legitimately thought it was some DOS compatibility layer or something. Like, you’d have to run Doom that way because of the low framerate natively.

null

[deleted]

ge96

> I always wanted as a teenager but could never afford

Funny how that is, for me it was a Sony Alpha camera (~~flagship at the time~~) and 10 years later I finally buy it for $50.

fabiensanglard

ge96

Yeah I was not exposed to camera gear at that time but seeing the NEX series with the tiny body and massive lens, I wanted it.

I know there are better cameras in the Alpha line but yeah, I had an R3 at one point which was wasted on me as an amateur.

klaussilveira

Glad to see another post on Fabien's blog!

prox

Is there a recommended place where I can play Doom in the browser?

If such a thing exists!

pastage

There are many variants of DOOM in the browser vanilla DOOM is easy but these are cooler

https://news.ycombinator.com/item?id=42607794 https://news.ycombinator.com/item?id=42566112

yjftsjthsd-h

I dunno about "recommended", but a quick search turns up several options, the most interesting of which (IMHO) is https://js-dos.com/DOOM/ (mostly because it looks like a generic "dosbox in web technologies" and that's sweet)

tasn

https://archive.org/details/doom-play or any of the other ones linked at the bottom of that page.

ge96

tangent: after playing Eternal, damn all other Doom is just slow... Dark Ages is coming out I'm pumped

Also reading Masters of Doom, Carmack and I have something in common ha (went to a form of jail)

hinkley

So what does one do with a faster Doom, besides bragging, larger maps and more simultaneous players?

fabiensanglard

You can play on vintage hardware with a decent refresh rate. It makes it more enjoyable.

pixelpoet

Thanks for your awesome articles :)

pixelpoet

Does it always have to be for practical benefit? What about pure learning and intellectual enjoyment? Where are the true limits? In the end absolutely nothing we do matters :)

These dudes are living their best lives, and having done Quake-style asm texture mapping loops in the 90s (Mike Abrash, fastmap, Chris Hecker, PC Game Programming Encyclopedia, ...), I can definitely appreciate it <3

Narishma

Run on slow hardware or save power if you're on a battery.

kridsdale1

Run it on more obscure hardware?