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

chore(deps): Bump com.alibaba:fastjson from 2.0.53 to 2.0.54 #16780

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 13, 2025

Bumps com.alibaba:fastjson from 2.0.53 to 2.0.54.

Release notes

Sourced from com.alibaba:fastjson's releases.

fastjson 2.0.54版本发布,性能进一步提升

这又是一个性能优化Bug修复的版本更新版本,大家按需升级。

1. 性能优化

这个版本的性能优化包括:

1.1 使用SWAR(SIMD Within A Register)技巧来优化序列化字符串的性能

序列化时,写字符串检测是否存在特别字符是一个性能关键点,这个版本使用SWAR(SIMD Within A Register)的技巧来做快速检测。如下

package com.alibaba.fastjson2;
class JSONWriterUTF8 {
    protected final long byteVectorQuote;
JSONWriterUTF8(Context ctx) {
// " -> 0x22, ' -> 0x27
this.byteVectorQuote = this.useSingleQuote ? 0x2727_2727_2727_2727L : 0x2222_2222_2222_2222L;
}
public void writeStringLatin1(byte[] value) {
    final long vecQuote = this.byteVectorQuote;
    int i = 0;
    final int upperBound = (value.length - i) & ~7;
    // 这里一次检测8个byte是否存在特别字符
    for (; i < upperBound; i += 8) {
        if (containsEscaped(IOUtils.getLongLittleEndian(value, i), vecQuote)) {
            break;
        }
    }
    // ...
}
static boolean containsEscaped(long v, long quote) {
/*
for (int i = 0; i < 8; ++i) {
byte c = (byte) data;
if (c == quote || c == '\' || c < ' ') {
return true;
}
data >>>= 8;
}
return false;
*/
long x22 = v ^ quote; // " -> 0x22, ' -> 0x27
long x5c = v ^ 0x5c5c5c5c5c5c5c5cL;
x22 = (x22 - 0x0101010101010101L) & ~x22;
x5c = (x5c - 0x0101010101010101L) & ~x5c;

return ((x22 | x5c | (0x7F7F_7F7F_7F7F_7F7FL - v + 0x1010_1010_1010_1010L) | v) & 0x8080808080808080L) != 0;

}

}
</tr></table>

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.alibaba:fastjson](https://github.com/alibaba/fastjson2) from 2.0.53 to 2.0.54.
- [Release notes](https://github.com/alibaba/fastjson2/releases)
- [Commits](alibaba/fastjson2@2.0.53...2.0.54)

---
updated-dependencies:
- dependency-name: com.alibaba:fastjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Jan 13, 2025
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟

🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run

  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot.

  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.

  • Build and test logs are available in the Summary page. Only Apache Camel committers have access to the summary.

  • ⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@apupier
Copy link
Contributor

apupier commented Jan 13, 2025

/component-test fastjson

Result ✅ The tests passed successfully

Copy link
Contributor

🤖 The Apache Camel test robot will run the tests for you 👍

1 similar comment
Copy link
Contributor

🤖 The Apache Camel test robot will run the tests for you 👍

@apupier apupier merged commit de4b6e8 into main Jan 13, 2025
5 checks passed
@dependabot dependabot bot deleted the dependabot/maven/com.alibaba-fastjson-2.0.54 branch January 13, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
camel-4 core-build-and-dependencies dependencies Pull requests that update a dependency file java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants