fastjson2/docs/vector_optimized.md
2023-04-16 06:45:16 +08:00

18 lines
469 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

JDK 17中提供了[vector api](https://openjdk.org/jeps/426)可以用SIMD来优化性能。
fastjson 2.0.28中已经支持vector api这个优化目前处于incubator状态需要通过如下方法打开
加上依赖
```xml
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2-incubator-vector</artifactId>
<version>2.0.28</version>
</dependency>
```
JVM启动参数加上
```shell
--add-modules=jdk.incubator.vector
```