Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wenshao
Copy link

@wenshao wenshao commented Dec 28, 2024

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

@CLAassistant
Copy link

CLAassistant commented Dec 28, 2024

CLA assistant check
All committers have signed the CLA.

…/String/concat/WithSecurityManager.java test
@kuaiwei kuaiwei requested review from kuaiwei and linade December 30, 2024 02:27
putChar(val, index + 3, c4);
}

public static void putCharsAt(byte[] val, int index, int c1, int c2, int c3, int c4, int c5) {
Copy link
Collaborator

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)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加漏了哈

@linade
Copy link
Collaborator

linade commented Jan 3, 2025

可以说明一下主要冲突的地方吗?

@wenshao
Copy link
Author

wenshao commented Jan 5, 2025

可以说明一下主要冲突的地方吗?

什么冲突啊?

Copy link
Collaborator

@kuaiwei kuaiwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linade
Copy link
Collaborator

linade commented Jan 6, 2025

可以说明一下主要冲突的地方吗?

什么冲突啊?

backport到21有冲突吗? 还是clean port

@wenshao
Copy link
Author

wenshao commented Jan 9, 2025

可以说明一下主要冲突的地方吗?

什么冲突啊?

backport到21有冲突吗? 还是clean port

不能直接cherry-pick,因为这里依赖的Class File API有很多变化,要把Class File API也port回来就变化太大了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants