OmCheeLin commented on PR #688: URL: https://github.com/apache/skywalking-banyandb/pull/688#issuecomment-3003471468
| Pattern | Type | ns/op | Compression Ratio | Encode Time (ns/op) | Decode Time (ns/op) | Encode+Decode (ns/op) | | ------------------- | ---------- | ------ | ----------------- | ------------------- | ------------------- | --------------------- | | const | old\_str | 386288 | 0.0004375 | 193984 | 409673 | 603657 | | const | new\_int64 | 423046 | 0.0001125 | 145797 | 486149 | 631946 | | deltaConst | old\_str | 379194 | 0.4867 | 206682 | 381112 | 587794 | | deltaConst | new\_int64 | 417510 | 0.0001250 | 148899 | 469816 | 618715 | | delta | old\_str | 416599 | 0.6001 | 235115 | 409261 | 644376 | | delta | new\_int64 | 518178 | 0.1251 | 222822 | 516450 | 739273 | | incremental | old\_str | 426709 | 0.6008 | 246630 | 425872 | 672502 | | incremental | new\_int64 | 516221 | 0.1251 | 213302 | 517664 | 730966 | | small\_fluctuations | old\_str | 888737 | 0.1301 | 620380 | 500583 | 1120963 | | small\_fluctuations | new\_int64 | 501009 | 0.1251 | 200673 | 506057 | 706730 | | random | old\_str | 570259 | 0.2552 | 349712 | 483792 | 833504 | | random | new\_int64 | 591644 | 0.1407 | 267363 | 587271 | 854634 | This is a benchmark for the int64 type (traditional encoding vs. new encoding). It shows that the compression ratio (encodedSize / rawSize) has a significant advantage, while the encode + decode time (ns/op) difference is minimal. | Pattern | Type | ns/op | Compression Ratio | Decode Time (ns/op) | Encode+Decode (ns/op) | Encode Time (ns/op) | |-------------------|----------------|----------|-------------------|---------------------|-----------------------|---------------------| | const | old_str | 417,934 | 0.0004375 | 446,205 | 647,333 | 201,128 | | const | new_float64 | 564,110 | 0.01572 | 584,195 | 785,398 | 201,203 | | incrementing | old_str | 416,769 | 0.4868 | 423,943 | 655,714 | 231,770 | | incrementing | new_float64 | 2,779,417| 1.031 | 1,627,414 | 3,048,532 | 1,421,118 | | small_fluctuations| old_str | 1,215,406| 1.752 | 572,129 | 1,472,848 | 900,719 | | small_fluctuations| new_float64 | 2,758,764| 1.031 | 1,567,165 | 3,012,954 | 1,445,789 | | random | old_str | 718,923 | 2.180 | 455,081 | 1,006,748 | 551,668 | | random | new_float64 | 2,649,813| 1.031 | 1,545,288 | 2,935,953 | 1,390,665 | This is float64 (traditional encoding vs XOR encoding). The XOR encoding seems to perform worse than expected. Except for the random pattern case where the compression ratio is slightly better, in other cases the compression ratio and encode+decode time (ns/op) are much worse than the traditional method. The benchmarks for tag and column are similar. Since the test data remains unchanged, I have already tested them, so I only wrote the benchmark tests under the measure package. -- 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: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org