You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
serialize/unserialize 3-6x slower than php (per-element temporaries); needs a native codec #280
serialize / unserialize of a list of 2 000 strings runs at about 2.3 ns/B and 6.8 ns/B natively against php's 0.7 and 1.1 (3x and 6x slower, linear). Profiles show the time in per-element string temporaries, memmove and the boxed mixed walker in prelude/serialize.php / prelude/unserialize.php. Tried and not worth it: an inline string leaf (~10%, within noise), in-place number parsing, substr_compare.
Proposal
A native IR serializer and parser for the common shapes (null, bool, int, float, string, array of those), falling back to the PHP walker for objects / references / Serializable. Same approach as __mc_json_escape.
Activity
serialize(): native single-buffer writer for scalars and arrays of th…
unserialize(): native strict parser for scalars and arrays of them, t…
Performance sweep of string and array functions, with the bugs it fou…
Fix the bug backlog: coercion, references, crashes, uninitialised typ…
blacktrs commentedon Nov 9, 2026
Fixed by #274. Measured on the 0.18.0 branch (#605), the issue's shape (2 000 strings, 2 000 rounds, macOS arm64): serialize 0.47 ns/B vs php 0.39; unserialize 0.70 ns/B vs php 0.84 (was 2.3 and 6.8 ns/B).