Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance: better default string functions #1420

Open
scolsen opened this issue Apr 22, 2022 · 0 comments
Open

performance: better default string functions #1420

scolsen opened this issue Apr 22, 2022 · 0 comments

Comments

@scolsen
Copy link
Contributor

scolsen commented Apr 22, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant