-
Notifications
You must be signed in to change notification settings - Fork 62
Standalone emoji support #202
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
Conversation
But i think that's ok -- mainly: we describe the specification of our wcwidth() and wcswidth() function. This includes that stuff.
I'll say, there are uses downstream, I see silly lines like:
for cp in range(1000000):
if wcwidth.wcwidth(cp) == 2:
wide_table.append(cp)
and they're going to suffer a bit from this, or they also benefit,
depending on context, but if they're "doing it wrong" they're probably
also not using iter_graphemes() anyway so there is no help
CodSpeed Performance ReportMerging this PR will degrade performance by 22.14%Comparing Summary
Performance Changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #202 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 896 938 +42
Branches 227 239 +12
=========================================
+ Hits 896 938 +42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
the frozenset, _EMOJI_ZWJ_SET is fastest
The boundary pattern in ``get_kitty_keyboard_state()`` used ``.+`` which matched prematurely! Existing tests didn't catch this because they use ungetch() which buffers the entire response jquast/wcwidth#200 jquast/wcwidth#202
CLoses #133 and #154.
This decreases general performance by ~10% for complex CJK/combining and emoji strings.