JavaScript measured at 94, JSON three times faster, and a round of fixes found against the reference browser
JavaScript got faster again: our measured score against a reference JavaScript engine, went from 87 to 94 on 42 real-world workloads. JSON.stringify is about three times faster, joining an array into text now beats the reference browser, and objects that a loop creates stay in registers even when the loop calls their methods, parent methods and getters. Heavy scripts are no longer cut off after a few milliseconds of work. Checking every case against the reference browser also found and fixed a crash and more than a dozen differences.
Objects made in a loop stay virtual through their methods. When a loop creates an object and uses it right away (new Item(i).total()), Floati's native compiler already kept its fields in CPU registers instead of allocating it (escape analysis). That now holds when the loop calls the object's methods, a parent class's method through super, or a getter: our class benchmark went from 37 ms to under 2 ms, about three times faster than the reference browser. If a page changes the class mid-loop, the compiled code notices on the next call and steps back.
JavaScript & JIT
Array callbacks compile into the loop. reduce, forEach, find, some, every, map and filter used to call your callback once per element through a shared driver; the callback is now compiled directly into the builtin's loop, with the running total of a reduce kept in a register. reduce went from about 3.8 to 0.85 nanoseconds per element, and our callbacks benchmark is twice as fast.
JavaScript & JIT
Loop counters run as whole numbers. A counter like i in for (let i = 0; i < n; i++) is now kept as a 32-bit integer where that pays: indexing arrays and text with it, comparing it and multiplying it by small constants skip the conversion to and from decimals, and past 2 billion the loop safely continues in decimals. Up to 23 percent faster on the loops it applies to, and never slower.
JavaScript & JIT
JSON.stringify is about three times faster. It now writes the whole result into one buffer in a single pass whenever nothing on the page can observe the difference (no getters, toJSON methods or proxies), and falls back to the full path otherwise: 28.5 ms to 9.5 ms on our benchmark, against the reference browser's 7.8.
Memory & reading
join and split are faster. Joining an array of strings and numbers writes straight into one piece of text instead of making a copy per element (200 joins of 2000 items: 20.8 ms to 2.2 ms, the reference browser 3.2), and split by a string cuts the text in place (10.6 ms to 7.8 ms). Short text like "k" + i is built with one memory allocation instead of three, which made looking up a Map by string key a quarter faster.
JavaScript & JIT
Heavy scripts are not cut off. A single script, event handler or timer was stopped after a fixed amount of work, which compiled loops reached in a few milliseconds of real time. The reference browser never stops a script; Floati now only stops one that has been running for 30 seconds straight (and navigating away still stops it at once).
JavaScript & JIT
A crash is fixed: an array that contains itself (list.push(list), then joining it or turning it into text) made the engine recurse until it ran out of stack. It now reads as empty where it repeats, as in every browser.
JavaScript & JIT
JSON.stringify now matches the reference browser everywhere we checked: toJSON receives its key, a toJSON a script adds to Object, Array or BigInt is honoured, typed arrays come out as numbered entries instead of internal details, a BigInt throws the error the standard requires, and backspace and form-feed characters are escaped as \b and \f.
Rendering
Text functions follow the standard at the edges: charCodeAt(-1) returns NaN instead of the first character, charAt(-0.5) and codePointAt(-0.5) read the first character, a split limit of -1 means no limit, splitting on an empty pattern separates characters, and string methods given an object now use that object's own toString (or its own split and replace behaviour).
JavaScript & JIT
A script whose text contains a line separator character inside quotes now loads; this has been valid JavaScript since 2019 and is common in JSON pasted into code.
JavaScript & JIT
JavaScript performance, measured, went from 87 to 94. The score compares Floati with the reference JavaScript runtime on 42 real-world workloads and is recomputed for every release. Each change above ships with a map of edge cases checked line by line against the reference JavaScript runtime on all three of Floati's execution tiers, and with a switch that turns it off.