-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Backport]String concatenation & StringBuilder appendNull/appendBoolean #160
base: master
Are you sure you want to change the base?
Conversation
…/String/concat/WithSecurityManager.java test
putChar(val, index + 3, c4); | ||
} | ||
|
||
public static void putCharsAt(byte[] val, int index, int c1, int c2, int c3, int c4, int c5) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么这里没有assert index >=0 && index + 4 < length(val)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加漏了哈
可以说明一下主要冲突的地方吗? |
什么冲突啊? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
backport到21有冲突吗? 还是clean port |
src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java
Outdated
Show resolved
Hide resolved
不能直接cherry-pick,因为这里依赖的Class File API有很多变化,要把Class File API也port回来就变化太大了。 |
backport 我提交给OpenJDK关于字符串拼接的优化,由于有代码共用,所以也backport了优化StringBuilder.append(boolean/null)的优化 PR 19626。
openjdk/jdk#19626 8333893: Optimization for StringBuilder append boolean & null
openjdk/jdk#20253 8336831: Optimize StringConcatHelper.simpleConcat
openjdk/jdk#20273 8336856: Efficient hidden class-based string concatenation strategy
openjdk/jdk#20675 8338930: StringConcatFactory hardCoded string concatenation strategy