Geethapranay1 commented on PR #3580: URL: https://github.com/apache/fory/pull/3580#issuecomment-4268204123
# Benchmarks: ### apache/main: struct plot: <img width="1800" height="750" alt="struct" src="https://github.com/user-attachments/assets/ee8ca997-578a-42ea-a006-b2a1e85200b7" /> throughput plot: <img width="4200" height="900" alt="throughput" src="https://github.com/user-attachments/assets/b039958e-6b00-4ada-b3df-26b6342a1f67" /> ## Benchmark Results ### Timing Results (nanoseconds) | Datatype | Operation | fory (ns) | protobuf (ns) | Fastest | |----------|-----------|-----------|---------------|---------| | Struct | Serialize | 110.9 | 183.1 | fory | | Struct | Deserialize | 65.2 | 113.0 | fory | | Sample | Serialize | 166.0 | 932.9 | fory | | Sample | Deserialize | 308.7 | 1322.6 | fory | | MediaContent | Serialize | 384.0 | 561.8 | fory | | MediaContent | Deserialize | 514.0 | 915.9 | fory | | StructList | Serialize | 270.9 | 924.6 | fory | | StructList | Deserialize | 222.0 | 752.9 | fory | | SampleList | Serialize | 653.2 | 6220.3 | fory | | SampleList | Deserialize | 2128.5 | 6932.7 | fory | | MediaContentList | Serialize | 1122.0 | 3809.1 | fory | | MediaContentList | Deserialize | 2758.9 | 5396.7 | fory | ### Throughput Results (ops/sec) | Datatype | Operation | fory TPS | protobuf TPS | Fastest | |----------|-----------|----------|--------------|---------| | Struct | Serialize | 9,019,572 | 5,462,988 | fory | | Struct | Deserialize | 15,341,423 | 8,853,475 | fory | | Sample | Serialize | 6,023,734 | 1,071,972 | fory | | Sample | Deserialize | 3,239,601 | 756,086 | fory | | MediaContent | Serialize | 2,603,963 | 1,779,866 | fory | | MediaContent | Deserialize | 1,945,374 | 1,091,882 | fory | | StructList | Serialize | 3,691,808 | 1,081,490 | fory | | StructList | Deserialize | 4,505,316 | 1,328,286 | fory | | SampleList | Serialize | 1,530,925 | 160,764 | fory | | SampleList | Deserialize | 469,814 | 144,244 | fory | | MediaContentList | Serialize | 891,266 | 262,529 | fory | | MediaContentList | Deserialize | 362,463 | 185,298 | fory | ### pr branch: struct plot: <img width="1800" height="750" alt="struct" src="https://github.com/user-attachments/assets/20cc67b2-3689-406b-8b7c-389d109df5d2" /> throughput plot: <img width="4200" height="900" alt="throughput" src="https://github.com/user-attachments/assets/a87e4029-98ef-41cb-9216-93c0e6651eaf" /> ## Benchmark Results ### Timing Results (nanoseconds) | Datatype | Operation | fory (ns) | protobuf (ns) | Fastest | |----------|-----------|-----------|---------------|---------| | Struct | Serialize | 109.8 | 183.0 | fory | | Struct | Deserialize | 60.3 | 112.5 | fory | | Sample | Serialize | 170.2 | 924.9 | fory | | Sample | Deserialize | 295.4 | 1241.1 | fory | | MediaContent | Serialize | 342.9 | 554.7 | fory | | MediaContent | Deserialize | 478.1 | 901.8 | fory | | StructList | Serialize | 261.1 | 897.5 | fory | | StructList | Deserialize | 220.7 | 713.2 | fory | | SampleList | Serialize | 606.3 | 5991.8 | fory | | SampleList | Deserialize | 2342.3 | 6954.9 | fory | | MediaContentList | Serialize | 1142.2 | 3876.4 | fory | | MediaContentList | Deserialize | 3066.6 | 5380.4 | fory | ### Throughput Results (ops/sec) | Datatype | Operation | fory TPS | protobuf TPS | Fastest | |----------|-----------|----------|--------------|---------| | Struct | Serialize | 9,104,980 | 5,463,884 | fory | | Struct | Deserialize | 16,575,501 | 8,890,469 | fory | | Sample | Serialize | 5,876,476 | 1,081,151 | fory | | Sample | Deserialize | 3,385,584 | 805,737 | fory | | MediaContent | Serialize | 2,915,877 | 1,802,906 | fory | | MediaContent | Deserialize | 2,091,744 | 1,108,881 | fory | | StructList | Serialize | 3,829,950 | 1,114,243 | fory | | StructList | Deserialize | 4,532,064 | 1,402,171 | fory | | SampleList | Serialize | 1,649,430 | 166,895 | fory | | SampleList | Deserialize | 426,931 | 143,784 | fory | | MediaContentList | Serialize | 875,503 | 257,971 | fory | | MediaContentList | Deserialize | 326,094 | 185,860 | fory | And for final comparison, I also ran repeated struct rounds (N=3) on the same machine and used median values: - Serialize: 165.72 ns -> 159.20 ns (-3.93%) - Deserialize: 88.731 ns -> 74.397 ns (-16.15%) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
