Propose new ClassName API#58
Conversation
This decouples the ClassName byte_len implementation from the descriptor usage, and makes ClassName usable in other contexts.
|
Thanks for the PR! On the whole this looks good but there were a bunch of changes in here that seemed unrelated to the main goal. For example the implementation of I'm going to revert some of the changes I believe are spurious, and I'm also making a change to the |
|
Please take a look at the changes I made. If it looks good to you I'm happy to merge this. |
|
thanks for the update @staktrace; i'm fully fine with your changes.
many thanks for having had a look and your hands on it. feel free to merge. |
|
Great, thank you! |
|
btw: i was curious about the performance difference in the two implementations; your version of |
|
Finally got around to looking at this. I improved the perf a bit in #60 but you're right that your original implementation is still faster. Still, unless it's shown to be the bottleneck in a real-world use case I'd rather not over-optimize at the expense of code maintainability/readability. |
please consider this just a possible proposal with regards to #52; more work would be necessary to cover also other places as mentioned by @wuwbobo2021 here; i'm willing to carry on with it, if you're fine with the simplistic api.