Skip to content
Snippets Groups Projects
Commit f9a39d1c authored by bos's avatar bos
Browse files

encodeUtf8_1: massively rework internals

The goal here is to avoid a buffer size check on every iteration,
instead only doing one the first time we encounter some input that's
larger than the buffer we preallocated.

This helps performance rather a lot: we don't regress on the smallest
inputs, but we are up to 35% faster than the previous version of
encodeUtf8 on larger inputs.
parent 71a54fd4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment