mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
This patch improves JSON.stringify performance through three changes: 1. Use a single StringBuilder for the entire operation instead of building up intermediate strings and concatenating them. 2. Format numbers directly into the StringBuilder via a new public number_to_string(StringBuilder&, ...) overload, avoiding temporary String allocations. 3. Track indentation as a depth counter instead of repeatedly concatenating the gap string.
1.8 KiB
1.8 KiB