Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.0.52
->2.0.54
2.0.52
->2.0.54.android8
Release Notes
alibaba/fastjson2 (com.alibaba:fastjson)
v2.0.54
: fastjson 2.0.54版本发布,性能进一步提升Compare Source
这又是一个性能优化Bug修复的版本更新版本,大家按需升级。
1. 性能优化
这个版本的性能优化包括:
1.1 使用SWAR(SIMD Within A Register)技巧来优化序列化字符串的性能
序列化时,写字符串检测是否存在特别字符是一个性能关键点,这个版本使用SWAR(SIMD Within A Register)的技巧来做快速检测。如下
https://github.com/alibaba/fastjson2/blob/2.0.54/core/src/main/java/com/alibaba/fastjson2/JSONWriterUTF8.java#L484
1.2 优化在JDK 16+的readString性能
在JDK 16+的版本下,使用StringLatin1.indexOfChar方法加速扫描特殊字符,优化readString的性能。这个算法来自 wycst 的贡献。
https://github.com/alibaba/fastjson2/blob/2.0.54/core/src/main/java/com/alibaba/fastjson2/JSONReaderASCII.java#L1445
1.3 int/long/float/double的读取写性能
优化的技巧是一次性读取两个数字,如下:
https://github.com/alibaba/fastjson2/blob/2.0.54/core/src/main/java/com/alibaba/fastjson2/JSONReaderUTF8.java#L3506
这个优化最初灵感源泉来自 https://github.com/wycst/wast 的 io.github.wycst.wast.json.JSONTypeDeserializer.NumberImpl#deserializeInteger所采用的算法,然后做了进一步的改进。
2. Issues
{
不报错的问题 #2592fastjson2缺省是能识别Gson的Annotation的,这个可以通过接口或者JVM启动参数关闭
也支持通过JVM启动参数关闭
MAVEN依赖配置
这个版本支持java.time和Optional
3. 相关链接
v2.0.53
: fastjson 2.0.53版本发布Compare Source
这又是一个月度更新版本,大家按需升级。
Issues
2. MAVEN依赖配置
这个版本支持java.time和Optional
3. 相关链接
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.