Commit deced33
committed
add patch to speed up V8 snapshot deserialization
Two optimizations targeting the hot deserialization loop:
1. Skip write barriers during non-user-code deserialization. During
startup/shared-heap/context deserialization all objects are allocated
in old space and incremental marking is not active, so every write
barrier is a guaranteed no-op — but each still pays ~8 instructions
of MemoryChunk lookups and branch checks per slot write.
2. Compile out trace_deserialization flag checks from the hot bytecode
dispatch loop (31 occurrences). Replace with TRACE_DESER macros that
compile to nothing unless V8_ENABLE_TRACE_DESERIALIZATION is defined,
reducing icache pressure in ReadSingleBytecodeData.1 parent fee98b1 commit deced33
1 file changed
Lines changed: 505 additions & 0 deletions
0 commit comments