Quantcast
Channel: Programming – Gea-Suan Lin's BLOG
Viewing all articles
Browse latest Browse all 131

FastDoom 的改善

$
0
0

Hacker News 上看到「Why fastDOOM is fast (fabiensanglard.net)」這篇,原文是「Why fastDOOM is fast」,裡面在講 FastDoom 相比於原版的 DOOM 為什麼快了這麼多的簡單分析。

前情提要的部分,DOOM 的程式碼在 1997 年就放出來了,後來在 1999 年另外再提供 GPL 授權:

The source code for Doom was released under a non-commercial license in 1997, and freely released under the GNU General Public License in 1999. Due to the release of its source code, Doom has been unofficially ported to numerous platforms. These ports include esoteric devices such as smart thermostats, pianos, and Doom itself, which led to variations of a long-running meme, "Can it run Doom?" and "It runs Doom".

作者把 FastDoom 裡面的每個 commit 都 compile 出來跑 fps 測試得到了很多有趣的資料,文章裡面其中提升最大的就是 0.1 版內的 build 36,從 22.55fps 到 24.504fps,提升了大約 8.6%:

但對應到的 commit e16bab8 卻意外的只是一個避免每次都 redraw 狀態列上百分比的部分,作者自己也有提到他測出來的時候也交叉確認了好幾次:

The MPV patch of v0.1 is without a doubt build 36 (e16bab8). The "Crispy 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.

另外一個有趣的地方是作者是實際在 486 的機器上測試,居然是 DX 的版本 (帶 FPU):

During the winter of 2024, I restored an IBM PS/1 486-DX2 66Mhz, "Mini-Tower", model 2168. It was the computer I always wanted as a teenager but could never afford. Words cannot do justice to the joy I felt while working on this machine.


Viewing all articles
Browse latest Browse all 131

Trending Articles


UPDATE SC IDOL: TWO BECOME ONE


Pokemon para colorear


Sapos para colorear


Long Distance Relationship Tagalog Love Quotes


Hugot Lines 2020 Patama : ML Edition


RE: Mutton Pies (frankie241)


Hagibis (1946) by Francisco V. Coching


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 3.42.0 by Vimeo Inc


Vimeo 11.6.0 by Vimeo.com, Inc.