Carp icon indicating copy to clipboard operation
Carp copied to clipboard

performance: better default string functions

Open scolsen opened this issue 3 years ago • 0 comments

the default implementations of some string functions can consume a lot of clock cycles, e.g. for large arrays which call the prn implementation for each member, yielding some function call overhead. I think (but I'm not certain)that calling printf directly on members would probably be at least a little more efficient: printf("%d" arr[i]) in the for body opposed to prn(arr[i]).

maybe we could tackle this similarly to blit? if there's an interface a type implements perhaps we can perform some optimization where we inline the printf call or something

scolsen avatar Apr 22 '22 01:04 scolsen