⚡ Sangsakala Proxy 🏠 Home
Skip to content

Attempt to optimize string serialization - #259

Open
lelit wants to merge 2 commits into
masterfrom
pywriter
Open

lelit wants to merge 2 commits into
masterfrom
pywriter

Conversation

@lelit

@lelit lelit commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

This has a more modest impact than that mentioned in issue #169, but a make benchmark reports 1.5-2x speedup on string dumps.

lelit added 2 commits November 3, 2026 16:40
This resurrects (part of) the optimization implemented by Ken in commit
697c15c, specifically the second half
where it avoided the need to "[...] convert into a codepoint, just get
the hex chars from the bytes directly", given that the code deals with
well-formed UTF-8, guaranteed by Python internals.

The other part of the original commit has been absorbed by underlying
rapidjson library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant