版本说明以英文撰写。
Scripts run faster on busy pages
A speed release for the engine. Loops, calls and classes stay on the compiled paths more often, bitwise math and array callbacks do less work per step, and a class made inside a function no longer keeps that function's whole scope alive. On nine real pages, script, style and layout time fell by 5% overall against 0.1.417, and no page got slower.
Busy pages finish their work sooner
Three of nine recorded real pages got measurably faster and the other six held level, measured on the same recorded network traffic for both versions. The gain comes from many small changes: compiled code that keeps more loops and calls, fewer copies of short values, and faster name checks.
Classes, calls and loops on faster paths
A derived class made in a loop is built from a template again, calls between compiled functions pass their arguments in registers, functions with a rest parameter compile, and wide object literals stay in the fastest loop tier.
A class per call no longer piles up
A class or method defined inside a function used to keep that function's whole scope alive, with everything the scope held, even when the method used none of it. Methods that need no outer name now hang off the outermost scope, once a literal has made a few of them.
改动内容
34 项改动- JavaScript 与 JITSpeed: a derived class made in a hot loop is built from its template again (super(...) into a templated parent stores nothing new): 80 -> 0.9 ms.
- JavaScript 与 JITSpeed: a method loop handed between two compiled tiers races both and keeps the faster one, and stale method checks are rebuilt once they cost more than they save (method loop 6.4 -> 0.26 ms, a class per call 33 -> 0.5 ms). Switches: FLOATI_NO_HANDOFF_RACE, FLOATI_NO_STALE_AMORTISE.
- 记忆与阅读Memory: a class or method that reads no outer name hangs off the outermost scope instead of keeping the function's whole scope alive, judged at a literal's fourth closure (a class per call: 797 -> 311 MB). Switches: FLOATI_NO_FREE_TRIM, FLOATI_FREE_JUDGE_AFTER.
- JavaScript 与 JITSpeed: a helper declared inside a function that is called again and again no longer re-runs the choice of compiled tier for each new copy of it. Switch: FLOATI_NO_RACE_VERDICT_SHARE.
- JavaScript 与 JITSpeed: the fastest loop tier builds object literals with up to 32 keys (was 8): a 9-key literal no longer drops its loop to a slower tier, 6.8 -> 1.7 ms. Switch: FLOATI_NATIVE_OBJ_KEYS.
- JavaScript 与 JITSpeed: loops on the register tier keep their body compiled, and compiled code converts values to strings or numbers inline: array pushes 4.8 -> 0.6 ms, destructuring 59 -> 35 ms, sorting objects 7.8 -> 4.1 ms, template strings 14.3 -> 9.1 ms. Switches: FLOATI_NO_LOOP_AHEAD_NATIVE_ONLY, FLOATI_NO_PLAN_TO_PRIM_INLINE.
- 记忆与阅读Speed: string methods are remembered per call site, and s.replace(regex, text) skips the general call path.
- JavaScript 与 JITSpeed: functions with a rest parameter compile, and the rest array is made at entry: 137 -> 25.5 ms. Switch: FLOATI_NO_PLAN_REST.
- JavaScript 与 JITSpeed: calls between compiled functions pass their arguments in registers, and small numeric helpers are copied into their callers: 52 -> 19 ms. Switches: FLOATI_NO_CROSS_LEAN, FLOATI_NO_PEEL_ARITH.
- JavaScript 与 JITSpeed: JSON.parse checks for repeated keys with a set once an object has more than 16 keys: 6.4 -> 3.9 ms. Switch: FLOATI_NO_JSON_SEEN_SET.
- JavaScript 与 JITSpeed: Map and Set lookups with number keys and short string splits run inside compiled loops.
- JavaScript 与 JITSpeed: /regex/.test(x) on a regex literal runs inside compiled loops.
- JavaScript 与 JITSpeed: helpers that write their locals after a branch, read an array argument, or run a loop of their own are copied into compiled loops (a numeric helper loop 7.4 -> 0.9 us). Switches: FLOATI_NO_INLINE_LOOPS, FLOATI_NO_INLINE_LOOPS_NATIVE.
- JavaScript 与 JITSpeed: the optimizing compiler is 2.6 times faster on large functions.
- JavaScript 与 JITSpeed: a global regex replace for simple repeated patterns runs in one pass, and short indexOf and charCodeAt calls stay in compiled loops (regex row 10.2 -> 8.8 ms).
- 记忆与阅读Memory: function values point straight at their code, and the record each function carries shrank from 112 to 80 bytes. Switch: FLOATI_NO_FN_DIRECT.
- 记忆与阅读Speed: code run through indirect eval, new Function or an inserted script remembers where its names live, like a normal script. Switch: FLOATI_GLOBAL_EVAL_DYNAMIC.
- JavaScript 与 JITSpeed: bitwise operators convert their numbers to 32-bit integers without a floating-point division (a bitwise loop with the compiler off: 2.16 -> 1.81 s). Switch: FLOATI_NO_INT_WRAP.
- 渲染Speed: names up to 16 letters are compared without a library call, which every cached property and global lookup does. Switch: FLOATI_NO_SHORT_COMPARE.
- JavaScript 与 JITSpeed: map, filter, forEach, reduce and the other array methods pass each callback its value, index and array without allocating a list per element (compiler off: 4.3 -> 3.4 s). Switch: FLOATI_NO_CB_ARGS_STACK.
- 渲染Speed: a large style sheet is parsed in memoized runs of top-level rules, and selector plans are reused when the rule index is rebuilt.
- 记忆与阅读Speed: getComputedStyle reuses its property names and remembers converted colours.
- 渲染Speed: checking a class body for super walks the syntax tree instead of copying and printing it.
- 记忆与阅读Speed: the memory allocator takes back blocks freed by other threads only for pages whose own free list is empty.
- JavaScript 与 JITSpeed: promises and async resume records are built from one cached layout. Switch: FLOATI_NO_FIXED_SHAPES.
- JavaScript 与 JITFix: Object.keys of a promise no longer lists an internal handled mark after then() was called.
- 渲染Fix: an anonymous class has no name, and a property key names a class value as it names a function.
- 渲染Fix: a plain function call sees new.target as undefined, so a nested function no longer sees an outer constructor's. Switch: FLOATI_NO_PLAIN_NEWTARGET.
- 渲染Fix: var arguments inside a function keeps the arguments object instead of resetting it. Switch: FLOATI_VAR_ARGUMENTS_RESETS.
- 渲染Fix: computed keys in an object literal are converted in source order.
- 渲染Fix: [].slice.call(arguments) reads the current values of the parameters.
- 渲染Fix: a class name is in its dead zone until the class is declared, so typeof before the declaration throws as in the reference browser. Switch: FLOATI_NO_CLASS_TDZ.
- 渲染Fix: in strict code a function declared inside a block is not visible outside it. Switch: FLOATI_NO_ANNEXB_SCOPE_FIX.
- 渲染Engine: a new register interpreter now covers classes, generators, async functions, eval code, super and spread calls; it stays switched off (FLOATI_LAMINAR=1 turns it on) until it is faster on real pages.








































