louise
The Louise language: compiler, runtime, std, tooling
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#88 · main · 15 min 30 s
0Étoiles
0Forks
40Issues
std/string: repeat doubles its copies, linear and log-depth
`repeat s n` was `s <> repeat s (n - 1)`: quadratic in the result (each step copied everything after it) and one stack frame per copy, so a million copies overflowed a small stack natively and took ~30 s to build a 2 MB string. It now doubles: about log2(n) concatenations and frames, and linear in the result's length. tests/run/string_repeat.lse runs under //@ small-stack with a million copies, which the old version could not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Parents ae18f62
2 fichiers modifiés, 43 ajouts, 1 suppressions
std/string.lse+13−1tests/run/string_repeat.lse+30−0