-
Notifications
You must be signed in to change notification settings - Fork 0
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
micro optimizations #5
Comments
If you can turn this into a PR and do some convincing performance comparison, I'll consider some or all of it. I suspect that things like e.g. "for loops are faster than while loops" are likely not really correct in any meaningful way...the example you link to shows a degenerate case where the body of the loops are insignificant (as the discussion therein points out).
This is an interesting point that may deserve independent discussion. Can you give an example or other motivation where the change will make a real difference in performance? Why can't they use class objects as keys in a dict? Are integers so much faster as keys that we should make the change? |
of course we need benchmarks
so, technically, i dont need def _parser_fsm and def feed in ideally we would have one "source of truth" for the ansi parser |
yepp. turns out, my solution is slower pyte benchmark:
probably its faster if the control tokens are longer ... closing |
FWIW, I fully endorse combining my work with pyte. If I could get the information provided by outta from pyte, I would gladly get rid of outta. See selectel/pyte#147. |
hey, thanks for this : )
i have briefly used this library on my journey to write a terminal widget for pysimplegui
only to notice later, that i need a full terminal emulator → pyte
anyway, i made some small optimizations for your code
i hope you find this useful to make
outta.parser
fasteri did not do any benchmarks, but ... im feeling lucky ; )
in general ...
The text was updated successfully, but these errors were encountered: