-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
term_esc_rgb() dominates profiles #277
Comments
Yeah, dropping the fprintf() entirely boosts FPS by 36%! w0000000000000000t. alright let's do this. |
Reducing it to a lookup table and some fputs() boosted us from 2300 FPS to 2600, and combining all those fputs() boosted us further to 2750. That's almost a 20% increase, not bad at all for an hours' work :D :D :D. Just broke 2800! (xfce4-terminal 80x70) |
dankamongmen
added a commit
that referenced
this issue
Jan 15, 2020
Profiling with `perf` revealed the fprintf() inside term_esc_rgb() to dominate our performance. Replace it with a u8->str lookup table and a hand-assembled string fed into a single fputs(). On a 80x70 xfce4-terminal geometry, this wins 20%+ FPS on the demo, w00t! Huzzah for profiling!
alacritty 91x34, hot shit! |
Merged
dankamongmen
added a commit
that referenced
this issue
Jan 15, 2020
Profiling with `perf` revealed the fprintf() inside term_esc_rgb() to dominate our performance. Replace it with a u8->str lookup table and a hand-assembled string fed into a single fputs(). On a 80x70 xfce4-terminal geometry, this wins 20%+ FPS on the demo, w00t! Huzzah for profiling!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running a profile against the (optimized) build of notcurses, I get this output in
notcurses-view
:absolutely dominated by fprintf(), which is entirely due to
term_esc_rgb()
. if we can get that sped up, we're going to recover a hell of a lot of cycles.for
notcurses-demo
, it was even more pronounced.The text was updated successfully, but these errors were encountered: