← Back to events
ActiveAIRelease

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

What happened

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…

Summary assembled by rule from the sources below

Why it's spreading

Sources