Make CodepointWidthDetector::GetWidth faster#3727
Conversation
|
And by the way, isn't it just way more natural to implement |
abc676a to
ed79d7f
Compare
|
(For the record, as it is Thanksgiving over here in the US, there's a good chance that no one reads this PR till next week. We're not just ghosting it 😋) |
|
@miniksa : out of curiosity, what happened to this PR? (I'm mostly looking through PRs to make sure my action isn't making a mess of things) |
miniksa
left a comment
There was a problem hiding this comment.
This is fine. I'm sorry it took months and a pandemic to review it.
zadjii-msft
left a comment
There was a problem hiding this comment.
Oh wow yea this is better. Sorry for saying "we're not ghosting it" and then ghosting it 👻
|
Pushed a merge to trigger new CI and friends. |
|
Thanks so much for rewriting this guy. 😄 |
|
Actually, it looks like |
|
@DHowett-MSFT I wish I could. I think the Actually the entire Honestly this PR feels vague to me at first. Took me a while to figure out what I was trying to accomplish. |
|
Thanks for paging it back into your memory. That all makes sense, I’ll mark it for merge :) |
|
@miniksa @zadjii-msft It's all right. Back then when I wrote this PR I was still trying to crack job interviews. And here we are. Life is like a box of chocolates. You never know what you gonna get. Just like you never know the difference between the meaning of "ghosing" in dictionary and in real life. (just kidding, you know how I enjoy working with you guys 😸 ) |
|
Hello @DHowett-MSFT! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This is a subset of #3578 which I think is harmless and the first step towards making things right. References #3546 #3578 ## Detailed Description of the Pull Request / Additional comments For more robust Unicode support, `CodepointWidthDetector` should provide concrete width information rather than a simple boolean of `IsWide`. Currently only `IsWide` is widely used and optimized using quick lookup table and fallback cache. This PR moves those optimization into `GetWidth`. ## Validation Steps Performed API remains unchanged. Things are not broken.
|
🎉 Handy links: |
This is a subset of #3578 which I think is harmless and the first step towards making things right.
References #3546 #3578
Detailed Description of the Pull Request / Additional comments
For more robust Unicode support,
CodepointWidthDetectorshould provide concrete width information rather than a simple boolean ofIsWide. Currently onlyIsWideis widely used and optimized using quick lookup table and fallback cache. This PR moves those optimization intoGetWidth.Validation Steps Performed
API remains unchanged. Things are not broken.