Les notes de version sont rédigées en anglais.
Faster JavaScript: loops that call a small stateful closure
A speed improvement for one of the most common patterns on the web: a loop that repeatedly calls a small function which remembers a value between calls, a counter, an accumulator, an iterator step, a stateful callback. These used to get no benefit from the engine's just-in-time compiler at all, because the loop fell back to the slow interpreter the moment the called function updated a captured variable. The engine now compiles them, and such loops run about three times faster (measured 2.8 to 3.5x on counters, accumulators and multi-variable closures). This is the shape behind a huge amount of real code, event tallies, animation steppers, reducers, memoizers, so pages that lean on it feel snappier. The change is held to the engine's usual correctness bar: it was checked against tens of thousands of randomly generated programs run both compiled and interpreted, with identical results required, so speed never comes at the cost of a wrong answer. Code that does not use this pattern is unchanged. The JavaScript performance aspect moves 49 to 50; the overall platform score stays at 70.
Ce qui a changé
3 changements- JavaScript et JITStateful-closure loops are compiled, not interpreted. A loop calling a small function that updates a captured variable (a counter's ++n, a reducer's total += x, a two-variable step) now runs on the compiler instead of falling back to the interpreter, about three times faster where before there was no speed-up.
- JavaScript et JITMulti-variable and shared closures are handled. Closures that write several captured variables, and separate calls that share the same captured state, are all compiled correctly, with the captured values committed and rolled back safely so a mid-loop bail-out never leaves a half-written value.
- JavaScript et JITVerified against tens of thousands of random programs. A new differential test generated 31,500 random closure-in-loop programs and ran each both compiled and interpreted, requiring identical results, alongside the full conformance suite, so the speed-up is proven not to change any answer.








































