← 返回事件
持续讨论AI发版

viable/strict/1788468668: [dynamo] Index bytecode constants by identity (#195622)

发生了什么

Bytecode assembly located every LOAD_CONST by linearly scanning the growing constant tuple. Large generated functions therefore spent quadratic time in constant lookup. Build an identity-to-index table once per assembly and update it when constants are appended. Object identity remains the key because equal constants can have different semantics, and unlike hashing it also supports unhashable constants. Test Plan: p…

摘要按规则整理自下方来源原文

为什么在扩散

来源