Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(java): optimize pojo copy performance (#1739)
## What does this PR do? optimize pojo copy performance by 1~4X and add copy benchmark ## Related issues <!-- Is there any related issue? Please attach here. - #xxxx0 - #xxxx1 - #xxxx2 --> ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fury/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark Before: ```java Benchmark (bufferType) (objectType) (references) Mode Cnt Score Error Units CopyBenchmark.fury_copy array MEDIA_CONTENT false thrpt 3 1294614.644 ± 2103796.392 ops/s CopyBenchmark.fury_copy array SAMPLE false thrpt 3 1909071.799 ± 2343118.356 ops/s CopyBenchmark.fury_copy array STRUCT false thrpt 3 1220680.635 ± 1019806.837 ops/s CopyBenchmark.fury_copy array STRUCT2 false thrpt 3 584429.541 ± 111229.502 ops/s CopyBenchmark.kryo_copy array MEDIA_CONTENT false thrpt 3 1008490.635 ± 309047.316 ops/s CopyBenchmark.kryo_copy array SAMPLE false thrpt 3 921863.274 ± 1082442.180 ops/s CopyBenchmark.kryo_copy array STRUCT false thrpt 3 1336939.990 ± 795836.830 ops/s CopyBenchmark.kryo_copy array STRUCT2 false thrpt 3 168367.000 ± 236966.711 ops/s ``` Java ```java Benchmark (bufferType) (objectType) (references) Mode Cnt Score Error Units CopyBenchmark.fury_copy array MEDIA_CONTENT false thrpt 3 2201830.808 ± 4640532.805 ops/s CopyBenchmark.fury_copy array SAMPLE false thrpt 3 4945272.027 ± 5429361.187 ops/s CopyBenchmark.fury_copy array STRUCT false thrpt 3 4809373.970 ± 6803285.896 ops/s CopyBenchmark.fury_copy array STRUCT2 false thrpt 3 2577391.052 ± 6682601.210 ops/s CopyBenchmark.kryo_copy array MEDIA_CONTENT false thrpt 3 830059.189 ± 2509547.599 ops/s CopyBenchmark.kryo_copy array SAMPLE false thrpt 3 696901.072 ± 525070.309 ops/s CopyBenchmark.kryo_copy array STRUCT false thrpt 3 980635.311 ± 2495689.418 ops/s CopyBenchmark.kryo_copy array STRUCT2 false thrpt 3 141996.627 ± 343339.930 ops/s ```
- Loading branch information