<feed xmlns='http://www.w3.org/2005/Atom'>
<title>living-village.git/src/LivingVillage.Kernel/RumorBench.fs, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>http://git.somhairle.bid/living-village.git/atom?h=main</id>
<link rel='self' href='http://git.somhairle.bid/living-village.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/living-village.git/'/>
<updated>2026-09-22T02:36:39+00:00</updated>
<entry>
<title>perf(kernel): P27 第一步 — Rumor 长跑基准与修复前量化</title>
<updated>2026-09-22T02:36:39+00:00</updated>
<author>
<name>Somhairle H. Marisol</name>
<email>muqiu-han@outlook.com</email>
</author>
<published>2026-09-22T02:36:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.somhairle.bid/living-village.git/commit/?id=164f4749460a304c1aaad4900ef3facc29859eb0'/>
<id>urn:sha1:164f4749460a304c1aaad4900ef3facc29859eb0</id>
<content type='text'>
新增 Kernel 层 Rumor 长跑基准（RumorBench.fs + headless --rumor-bench
[days npcs chats_per_day]），把「聊天→生成/追溯谣言」路径从 Sim.step 的 NPC
快照分配解耦，隔离测量谣言工作集随世界年龄的分配/耗时；同 Config 的
retained_id_checksum 证明确定性。

复核 M3-1 前提：World.Rumors 已被 M6a（d94ec2d/cc850bf）按 3 天保留窗口收敛，
单日成本平稳（1/5/10 天 ≈18.7/18.1/19.8s、≈19GB/天），超线性项消失。
剩余 Rumor 成本 = 每次聊天的两条 O(N) 扫描 latestRumorFor/rumorIsDuplicate，
且 [&lt;Struct&gt;] NpcId/RumorId 用 = 比较会逐条装箱（Sim.chat 单独测得 N=16000
时 393,736 B/次、随 N 线性）。

修复前基准（30 NPC，--rumor-bench D 30 2000）：
 3d  chat_calls=6000   retained=6000  alloc=930,716,456   ms=1626.7
 30d chat_calls=60000  retained=8000  alloc=13,419,045,864 ms=12182.5
 60d chat_calls=120000 retained=8000  alloc=27,297,668,608 ms=23769.7
（60d 工作集稳定 8000，不随年龄增长。）

docs/维护说明.md 新增 P27 小节记录上述现状与量级。不改任何模拟语义。
</content>
</entry>
</feed>
