builtin: change the default builder size used for string interpolations, from 256 bytes to 64 bytes

This commit is contained in:
Delyan Angelov 2025-01-25 16:50:24 +02:00
parent 1059a28946
commit d710d9ef85
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -694,7 +694,7 @@ pub:
// interpolation function
@[direct_array_access; manualfree]
pub fn str_intp(data_len int, input_base &StrIntpData) string {
mut res := strings.new_builder(256)
mut res := strings.new_builder(64)
for i := 0; i < data_len; i++ {
data := unsafe { &input_base[i] }
// avoid empty strings