This changes string handling in repeat() to copy the initial chunk once and then grow the result by copying from the already-built output buffer. That reduces the number of memmove() calls for larger repeat counts while preserving behavior.
| Case | Before | After | Change |
|---|---|---|---|
repeat('ab', 64) |
0.1939 s | 0.1866 s | 1.04x faster |
https://github.com/vim/vim/pull/19977
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()