nosuchtim / keykit

KeyKit - an algorithmic MIDI scripting language and GUI system
Other
98 stars 7 forks source link

Change bi_substr to use static local string #3069

Closed pbarada closed 1 year ago

pbarada commented 1 year ago

Update bi_substr to use a static temp string instead of alloc/free it on every invocation. I used a bi_substr static 'substr_buf' string, not sure if better to use one of the other temp strings(Msg1, etc) for this (if so, comment and I'll update pull reuest). Removing the bi_substr alloc/free cuts down malloc/free count by 83.75% (645288 => 104807) when running bin/resetlib.

Give it a whirl...