[GitHub] [dubbo] LinShunKang commented on pull request #5880: [Dubbo-Performance] Reduce memory allocation for URL parse

2020-03-20 Thread GitHub
char 的范围是 [0, 65535] * 如果 HEX2B 大小为 128,那么在 StringUtils#decodeHexNibble(char) 方法中就需要判断入参的大小是否在 128 之内,如果在 128 以内则返回 HEX2B[c],如果不在 128 以内则返回默认值 -1 * 如果 HEX2B 大小为 65536,那么在 StringUtils#decodeHexNibble(char) 方法中就可以直接返回 HEX2B[c] 这个就需要取舍了。 [ Full content available at:

[GitHub] [dubbo] LinShunKang commented on pull request #5880: [Dubbo-Performance] Reduce memory allocation for URL parse

2020-03-20 Thread GitHub
是的,可以,之所以这么写是为了保持上下文逻辑的一致性,统一使用 indexof(String, char, int, int) [ Full content available at: https://github.com/apache/dubbo/pull/5880 ] This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org - To

[GitHub] [dubbo] LinShunKang commented on pull request #5880: [Dubbo-Performance] Reduce memory allocation for URL parse

2020-03-20 Thread GitHub
可以使用缓存,但是需要多维护一个类似于 Trie 的代码,这就需要考虑代价与收益了 [ Full content available at: https://github.com/apache/dubbo/pull/5880 ] This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org - To unsubscribe, e-mail: