[ https://issues.apache.org/jira/browse/THRIFT-2502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13983154#comment-13983154 ]
Aleksey Pesternikov edited comment on THRIFT-2502 at 4/28/14 4:19 PM: ---------------------------------------------------------------------- microbenchmarks before proto modifications: {noformat} BenchmarkBinaryBool_0 2000000 886 ns/op 48 B/op 6 allocs/op BenchmarkBinaryByte_0 1000000 1110 ns/op 64 B/op 8 allocs/op BenchmarkBinaryI16_0 2000000 931 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI32_0 1000000 1030 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI64_0 1000000 1541 ns/op 8 B/op 1 allocs/op BenchmarkBinaryDouble_0 1000000 1694 ns/op 8 B/op 1 allocs/op BenchmarkBinaryString_0 1000000 1918 ns/op 344 B/op 13 allocs/op BenchmarkBinaryBinary_0 5000000 603 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_1 1000000 1058 ns/op 48 B/op 6 allocs/op BenchmarkBinaryByte_1 1000000 1288 ns/op 64 B/op 8 allocs/op BenchmarkBinaryI16_1 1000000 1159 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI32_1 1000000 1261 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI64_1 1000000 1804 ns/op 8 B/op 1 allocs/op BenchmarkBinaryDouble_1 1000000 1969 ns/op 8 B/op 1 allocs/op BenchmarkBinaryString_1 1000000 2216 ns/op 344 B/op 13 allocs/op BenchmarkBinaryBinary_1 5000000 727 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_2 1000000 1516 ns/op 192 B/op 10 allocs/op BenchmarkBinaryByte_2 1000000 1822 ns/op 208 B/op 12 allocs/op BenchmarkBinaryI16_2 1000000 1615 ns/op 168 B/op 5 allocs/op BenchmarkBinaryI32_2 1000000 1736 ns/op 184 B/op 5 allocs/op BenchmarkBinaryI64_2 1000000 2310 ns/op 248 B/op 5 allocs/op BenchmarkBinaryDouble_2 1000000 2441 ns/op 264 B/op 5 allocs/op BenchmarkBinaryString_2 1000000 2676 ns/op 584 B/op 17 allocs/op BenchmarkBinaryBinary_2 1000000 1189 ns/op 448 B/op 5 allocs/op BenchmarkCompactBool_0 1000000 1033 ns/op 96 B/op 12 allocs/op BenchmarkCompactByte_0 1000000 1339 ns/op 128 B/op 16 allocs/op BenchmarkCompactI16_0 1000000 2527 ns/op 200 B/op 25 allocs/op BenchmarkCompactI32_0 500000 3331 ns/op 264 B/op 33 allocs/op BenchmarkCompactI64_0 500000 6641 ns/op 664 B/op 70 allocs/op BenchmarkCompactDouble0 500000 3573 ns/op 240 B/op 30 allocs/op BenchmarkCompactString0 1000000 2716 ns/op 432 B/op 24 allocs/op BenchmarkCompactBinary0 2000000 804 ns/op 184 B/op 4 allocs/op BenchmarkCompactBool_1 1000000 1210 ns/op 96 B/op 12 allocs/op BenchmarkCompactByte_1 1000000 1511 ns/op 128 B/op 16 allocs/op BenchmarkCompactI16_1 1000000 2834 ns/op 200 B/op 25 allocs/op BenchmarkCompactI32_1 500000 3598 ns/op 264 B/op 33 allocs/op BenchmarkCompactI64_1 500000 7338 ns/op 664 B/op 70 allocs/op BenchmarkCompactDouble1 500000 3832 ns/op 240 B/op 30 allocs/op BenchmarkCompactString1 1000000 2947 ns/op 432 B/op 24 allocs/op BenchmarkCompactBinary1 2000000 902 ns/op 184 B/op 4 allocs/op BenchmarkCompactBool_2 1000000 1576 ns/op 232 B/op 16 allocs/op BenchmarkCompactByte_2 1000000 1867 ns/op 264 B/op 20 allocs/op BenchmarkCompactI16_2 500000 3226 ns/op 344 B/op 29 allocs/op BenchmarkCompactI32_2 500000 4035 ns/op 424 B/op 37 allocs/op BenchmarkCompactI64_2 200000 7665 ns/op 856 B/op 74 allocs/op BenchmarkCompactDouble2 500000 4250 ns/op 496 B/op 34 allocs/op BenchmarkCompactString2 500000 3416 ns/op 656 B/op 28 allocs/op BenchmarkCompactBinary2 1000000 1397 ns/op 472 B/op 8 allocs/op {noformat} After modifications: {noformat} BenchmarkBinaryBool_0 5000000 335 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_0 5000000 388 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_0 5000000 671 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_0 2000000 752 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_0 1000000 1191 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_0 1000000 1350 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_0 1000000 1145 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_0 5000000 584 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_1 5000000 633 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_1 2000000 758 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_1 2000000 863 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_1 2000000 947 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_1 1000000 1413 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_1 1000000 1556 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_1 1000000 1404 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_1 5000000 677 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_2 5000000 518 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_2 5000000 582 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_2 2000000 984 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_2 1000000 1095 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_2 1000000 1576 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_2 1000000 1758 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_2 1000000 1522 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_2 2000000 771 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_0 5000000 304 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_0 5000000 384 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_0 5000000 675 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_0 2000000 778 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_0 1000000 1442 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble0 1000000 1490 ns/op 0 B/op 0 allocs/op BenchmarkCompactString0 2000000 965 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary0 5000000 571 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_1 5000000 589 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_1 5000000 735 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_1 1000000 1136 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_1 1000000 1414 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_1 1000000 2684 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble1 1000000 1663 ns/op 0 B/op 0 allocs/op BenchmarkCompactString1 1000000 1266 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary1 5000000 694 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_2 5000000 477 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_2 5000000 571 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_2 2000000 970 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_2 1000000 1111 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_2 1000000 1922 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble2 1000000 1870 ns/op 0 B/op 0 allocs/op BenchmarkCompactString2 1000000 1208 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary2 2000000 756 ns/op 160 B/op 1 allocs/op {noformat} Net effect: {noformat} benchmark old ns/op new ns/op delta BenchmarkBinaryBool_0 886 335 -62.19% BenchmarkBinaryByte_0 1110 388 -65.05% BenchmarkBinaryI16_0 931 671 -27.93% BenchmarkBinaryI32_0 1030 752 -26.99% BenchmarkBinaryI64_0 1541 1191 -22.71% BenchmarkBinaryDouble_0 1694 1350 -20.31% BenchmarkBinaryString_0 1918 1145 -40.30% BenchmarkBinaryBinary_0 603 584 -3.15% BenchmarkBinaryBool_1 1058 633 -40.17% BenchmarkBinaryByte_1 1288 758 -41.15% BenchmarkBinaryI16_1 1159 863 -25.54% BenchmarkBinaryI32_1 1261 947 -24.90% BenchmarkBinaryI64_1 1804 1413 -21.67% BenchmarkBinaryDouble_1 1969 1556 -20.98% BenchmarkBinaryString_1 2216 1404 -36.64% BenchmarkBinaryBinary_1 727 677 -6.88% BenchmarkBinaryBool_2 1516 518 -65.83% BenchmarkBinaryByte_2 1822 582 -68.06% BenchmarkBinaryI16_2 1615 984 -39.07% BenchmarkBinaryI32_2 1736 1095 -36.92% BenchmarkBinaryI64_2 2310 1576 -31.77% BenchmarkBinaryDouble_2 2441 1758 -27.98% BenchmarkBinaryString_2 2676 1522 -43.12% BenchmarkBinaryBinary_2 1189 771 -35.16% BenchmarkCompactBool_0 1033 304 -70.57% BenchmarkCompactByte_0 1339 384 -71.32% BenchmarkCompactI16_0 2527 675 -73.29% BenchmarkCompactI32_0 3331 778 -76.64% BenchmarkCompactI64_0 6641 1442 -78.29% BenchmarkCompactDouble0 3573 1490 -58.30% BenchmarkCompactString0 2716 965 -64.47% BenchmarkCompactBinary0 804 571 -28.98% BenchmarkCompactBool_1 1210 589 -51.32% BenchmarkCompactByte_1 1511 735 -51.36% BenchmarkCompactI16_1 2834 1136 -59.92% BenchmarkCompactI32_1 3598 1414 -60.70% BenchmarkCompactI64_1 7338 2684 -63.42% BenchmarkCompactDouble1 3832 1663 -56.60% BenchmarkCompactString1 2947 1266 -57.04% BenchmarkCompactBinary1 902 694 -23.06% BenchmarkCompactBool_2 1576 477 -69.73% BenchmarkCompactByte_2 1867 571 -69.42% BenchmarkCompactI16_2 3226 970 -69.93% BenchmarkCompactI32_2 4035 1111 -72.47% BenchmarkCompactI64_2 7665 1922 -74.92% BenchmarkCompactDouble2 4250 1870 -56.00% BenchmarkCompactString2 3416 1208 -64.64% BenchmarkCompactBinary2 1397 756 -45.88% benchmark old allocs new allocs delta BenchmarkBinaryBool_0 6 0 -100.00% BenchmarkBinaryByte_0 8 0 -100.00% BenchmarkBinaryI16_0 1 0 -100.00% BenchmarkBinaryI32_0 1 0 -100.00% BenchmarkBinaryI64_0 1 0 -100.00% BenchmarkBinaryDouble_0 1 0 -100.00% BenchmarkBinaryString_0 13 4 -69.23% BenchmarkBinaryBinary_0 1 1 0.00% BenchmarkBinaryBool_1 6 0 -100.00% BenchmarkBinaryByte_1 8 0 -100.00% BenchmarkBinaryI16_1 1 0 -100.00% BenchmarkBinaryI32_1 1 0 -100.00% BenchmarkBinaryI64_1 1 0 -100.00% BenchmarkBinaryDouble_1 1 0 -100.00% BenchmarkBinaryString_1 13 4 -69.23% BenchmarkBinaryBinary_1 1 1 0.00% BenchmarkBinaryBool_2 10 0 -100.00% BenchmarkBinaryByte_2 12 0 -100.00% BenchmarkBinaryI16_2 5 0 -100.00% BenchmarkBinaryI32_2 5 0 -100.00% BenchmarkBinaryI64_2 5 0 -100.00% BenchmarkBinaryDouble_2 5 0 -100.00% BenchmarkBinaryString_2 17 4 -76.47% BenchmarkBinaryBinary_2 5 1 -80.00% BenchmarkCompactBool_0 12 0 -100.00% BenchmarkCompactByte_0 16 0 -100.00% BenchmarkCompactI16_0 25 0 -100.00% BenchmarkCompactI32_0 33 0 -100.00% BenchmarkCompactI64_0 70 0 -100.00% BenchmarkCompactDouble0 30 0 -100.00% BenchmarkCompactString0 24 4 -83.33% BenchmarkCompactBinary0 4 1 -75.00% BenchmarkCompactBool_1 12 0 -100.00% BenchmarkCompactByte_1 16 0 -100.00% BenchmarkCompactI16_1 25 0 -100.00% BenchmarkCompactI32_1 33 0 -100.00% BenchmarkCompactI64_1 70 0 -100.00% BenchmarkCompactDouble1 30 0 -100.00% BenchmarkCompactString1 24 4 -83.33% BenchmarkCompactBinary1 4 1 -75.00% BenchmarkCompactBool_2 16 0 -100.00% BenchmarkCompactByte_2 20 0 -100.00% BenchmarkCompactI16_2 29 0 -100.00% BenchmarkCompactI32_2 37 0 -100.00% BenchmarkCompactI64_2 74 0 -100.00% BenchmarkCompactDouble2 34 0 -100.00% BenchmarkCompactString2 28 4 -85.71% BenchmarkCompactBinary2 8 1 -87.50% benchmark old bytes new bytes delta BenchmarkBinaryBool_0 48 0 -100.00% BenchmarkBinaryByte_0 64 0 -100.00% BenchmarkBinaryI16_0 8 0 -100.00% BenchmarkBinaryI32_0 8 0 -100.00% BenchmarkBinaryI64_0 8 0 -100.00% BenchmarkBinaryDouble_0 8 0 -100.00% BenchmarkBinaryString_0 344 112 -67.44% BenchmarkBinaryBinary_0 160 160 0.00% BenchmarkBinaryBool_1 48 0 -100.00% BenchmarkBinaryByte_1 64 0 -100.00% BenchmarkBinaryI16_1 8 0 -100.00% BenchmarkBinaryI32_1 8 0 -100.00% BenchmarkBinaryI64_1 8 0 -100.00% BenchmarkBinaryDouble_1 8 0 -100.00% BenchmarkBinaryString_1 344 112 -67.44% BenchmarkBinaryBinary_1 160 160 0.00% BenchmarkBinaryBool_2 192 0 -100.00% BenchmarkBinaryByte_2 208 0 -100.00% BenchmarkBinaryI16_2 168 0 -100.00% BenchmarkBinaryI32_2 184 0 -100.00% BenchmarkBinaryI64_2 248 0 -100.00% BenchmarkBinaryDouble_2 264 0 -100.00% BenchmarkBinaryString_2 584 112 -80.82% BenchmarkBinaryBinary_2 448 160 -64.29% BenchmarkCompactBool_0 96 0 -100.00% BenchmarkCompactByte_0 128 0 -100.00% BenchmarkCompactI16_0 200 0 -100.00% BenchmarkCompactI32_0 264 0 -100.00% BenchmarkCompactI64_0 664 0 -100.00% BenchmarkCompactDouble0 240 0 -100.00% BenchmarkCompactString0 432 112 -74.07% BenchmarkCompactBinary0 184 160 -13.04% BenchmarkCompactBool_1 96 0 -100.00% BenchmarkCompactByte_1 128 0 -100.00% BenchmarkCompactI16_1 200 0 -100.00% BenchmarkCompactI32_1 264 0 -100.00% BenchmarkCompactI64_1 664 0 -100.00% BenchmarkCompactDouble1 240 0 -100.00% BenchmarkCompactString1 432 112 -74.07% BenchmarkCompactBinary1 184 160 -13.04% BenchmarkCompactBool_2 232 0 -100.00% BenchmarkCompactByte_2 264 0 -100.00% BenchmarkCompactI16_2 344 0 -100.00% BenchmarkCompactI32_2 424 0 -100.00% BenchmarkCompactI64_2 856 0 -100.00% BenchmarkCompactDouble2 496 0 -100.00% BenchmarkCompactString2 656 112 -82.93% BenchmarkCompactBinary2 472 160 -66.10% {noformat} was (Author: apesternikov): microbenchmarks without proto modifications: {noformat} BenchmarkBinaryBool_0 2000000 886 ns/op 48 B/op 6 allocs/op BenchmarkBinaryByte_0 1000000 1110 ns/op 64 B/op 8 allocs/op BenchmarkBinaryI16_0 2000000 931 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI32_0 1000000 1030 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI64_0 1000000 1541 ns/op 8 B/op 1 allocs/op BenchmarkBinaryDouble_0 1000000 1694 ns/op 8 B/op 1 allocs/op BenchmarkBinaryString_0 1000000 1918 ns/op 344 B/op 13 allocs/op BenchmarkBinaryBinary_0 5000000 603 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_1 1000000 1058 ns/op 48 B/op 6 allocs/op BenchmarkBinaryByte_1 1000000 1288 ns/op 64 B/op 8 allocs/op BenchmarkBinaryI16_1 1000000 1159 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI32_1 1000000 1261 ns/op 8 B/op 1 allocs/op BenchmarkBinaryI64_1 1000000 1804 ns/op 8 B/op 1 allocs/op BenchmarkBinaryDouble_1 1000000 1969 ns/op 8 B/op 1 allocs/op BenchmarkBinaryString_1 1000000 2216 ns/op 344 B/op 13 allocs/op BenchmarkBinaryBinary_1 5000000 727 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_2 1000000 1516 ns/op 192 B/op 10 allocs/op BenchmarkBinaryByte_2 1000000 1822 ns/op 208 B/op 12 allocs/op BenchmarkBinaryI16_2 1000000 1615 ns/op 168 B/op 5 allocs/op BenchmarkBinaryI32_2 1000000 1736 ns/op 184 B/op 5 allocs/op BenchmarkBinaryI64_2 1000000 2310 ns/op 248 B/op 5 allocs/op BenchmarkBinaryDouble_2 1000000 2441 ns/op 264 B/op 5 allocs/op BenchmarkBinaryString_2 1000000 2676 ns/op 584 B/op 17 allocs/op BenchmarkBinaryBinary_2 1000000 1189 ns/op 448 B/op 5 allocs/op BenchmarkCompactBool_0 1000000 1033 ns/op 96 B/op 12 allocs/op BenchmarkCompactByte_0 1000000 1339 ns/op 128 B/op 16 allocs/op BenchmarkCompactI16_0 1000000 2527 ns/op 200 B/op 25 allocs/op BenchmarkCompactI32_0 500000 3331 ns/op 264 B/op 33 allocs/op BenchmarkCompactI64_0 500000 6641 ns/op 664 B/op 70 allocs/op BenchmarkCompactDouble0 500000 3573 ns/op 240 B/op 30 allocs/op BenchmarkCompactString0 1000000 2716 ns/op 432 B/op 24 allocs/op BenchmarkCompactBinary0 2000000 804 ns/op 184 B/op 4 allocs/op BenchmarkCompactBool_1 1000000 1210 ns/op 96 B/op 12 allocs/op BenchmarkCompactByte_1 1000000 1511 ns/op 128 B/op 16 allocs/op BenchmarkCompactI16_1 1000000 2834 ns/op 200 B/op 25 allocs/op BenchmarkCompactI32_1 500000 3598 ns/op 264 B/op 33 allocs/op BenchmarkCompactI64_1 500000 7338 ns/op 664 B/op 70 allocs/op BenchmarkCompactDouble1 500000 3832 ns/op 240 B/op 30 allocs/op BenchmarkCompactString1 1000000 2947 ns/op 432 B/op 24 allocs/op BenchmarkCompactBinary1 2000000 902 ns/op 184 B/op 4 allocs/op BenchmarkCompactBool_2 1000000 1576 ns/op 232 B/op 16 allocs/op BenchmarkCompactByte_2 1000000 1867 ns/op 264 B/op 20 allocs/op BenchmarkCompactI16_2 500000 3226 ns/op 344 B/op 29 allocs/op BenchmarkCompactI32_2 500000 4035 ns/op 424 B/op 37 allocs/op BenchmarkCompactI64_2 200000 7665 ns/op 856 B/op 74 allocs/op BenchmarkCompactDouble2 500000 4250 ns/op 496 B/op 34 allocs/op BenchmarkCompactString2 500000 3416 ns/op 656 B/op 28 allocs/op BenchmarkCompactBinary2 1000000 1397 ns/op 472 B/op 8 allocs/op {noformat} After modifications: {noformat} BenchmarkBinaryBool_0 5000000 335 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_0 5000000 388 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_0 5000000 671 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_0 2000000 752 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_0 1000000 1191 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_0 1000000 1350 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_0 1000000 1145 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_0 5000000 584 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_1 5000000 633 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_1 2000000 758 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_1 2000000 863 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_1 2000000 947 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_1 1000000 1413 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_1 1000000 1556 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_1 1000000 1404 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_1 5000000 677 ns/op 160 B/op 1 allocs/op BenchmarkBinaryBool_2 5000000 518 ns/op 0 B/op 0 allocs/op BenchmarkBinaryByte_2 5000000 582 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI16_2 2000000 984 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI32_2 1000000 1095 ns/op 0 B/op 0 allocs/op BenchmarkBinaryI64_2 1000000 1576 ns/op 0 B/op 0 allocs/op BenchmarkBinaryDouble_2 1000000 1758 ns/op 0 B/op 0 allocs/op BenchmarkBinaryString_2 1000000 1522 ns/op 112 B/op 4 allocs/op BenchmarkBinaryBinary_2 2000000 771 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_0 5000000 304 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_0 5000000 384 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_0 5000000 675 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_0 2000000 778 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_0 1000000 1442 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble0 1000000 1490 ns/op 0 B/op 0 allocs/op BenchmarkCompactString0 2000000 965 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary0 5000000 571 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_1 5000000 589 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_1 5000000 735 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_1 1000000 1136 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_1 1000000 1414 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_1 1000000 2684 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble1 1000000 1663 ns/op 0 B/op 0 allocs/op BenchmarkCompactString1 1000000 1266 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary1 5000000 694 ns/op 160 B/op 1 allocs/op BenchmarkCompactBool_2 5000000 477 ns/op 0 B/op 0 allocs/op BenchmarkCompactByte_2 5000000 571 ns/op 0 B/op 0 allocs/op BenchmarkCompactI16_2 2000000 970 ns/op 0 B/op 0 allocs/op BenchmarkCompactI32_2 1000000 1111 ns/op 0 B/op 0 allocs/op BenchmarkCompactI64_2 1000000 1922 ns/op 0 B/op 0 allocs/op BenchmarkCompactDouble2 1000000 1870 ns/op 0 B/op 0 allocs/op BenchmarkCompactString2 1000000 1208 ns/op 112 B/op 4 allocs/op BenchmarkCompactBinary2 2000000 756 ns/op 160 B/op 1 allocs/op {noformat} Net effect: {noformat} benchmark old ns/op new ns/op delta BenchmarkBinaryBool_0 886 335 -62.19% BenchmarkBinaryByte_0 1110 388 -65.05% BenchmarkBinaryI16_0 931 671 -27.93% BenchmarkBinaryI32_0 1030 752 -26.99% BenchmarkBinaryI64_0 1541 1191 -22.71% BenchmarkBinaryDouble_0 1694 1350 -20.31% BenchmarkBinaryString_0 1918 1145 -40.30% BenchmarkBinaryBinary_0 603 584 -3.15% BenchmarkBinaryBool_1 1058 633 -40.17% BenchmarkBinaryByte_1 1288 758 -41.15% BenchmarkBinaryI16_1 1159 863 -25.54% BenchmarkBinaryI32_1 1261 947 -24.90% BenchmarkBinaryI64_1 1804 1413 -21.67% BenchmarkBinaryDouble_1 1969 1556 -20.98% BenchmarkBinaryString_1 2216 1404 -36.64% BenchmarkBinaryBinary_1 727 677 -6.88% BenchmarkBinaryBool_2 1516 518 -65.83% BenchmarkBinaryByte_2 1822 582 -68.06% BenchmarkBinaryI16_2 1615 984 -39.07% BenchmarkBinaryI32_2 1736 1095 -36.92% BenchmarkBinaryI64_2 2310 1576 -31.77% BenchmarkBinaryDouble_2 2441 1758 -27.98% BenchmarkBinaryString_2 2676 1522 -43.12% BenchmarkBinaryBinary_2 1189 771 -35.16% BenchmarkCompactBool_0 1033 304 -70.57% BenchmarkCompactByte_0 1339 384 -71.32% BenchmarkCompactI16_0 2527 675 -73.29% BenchmarkCompactI32_0 3331 778 -76.64% BenchmarkCompactI64_0 6641 1442 -78.29% BenchmarkCompactDouble0 3573 1490 -58.30% BenchmarkCompactString0 2716 965 -64.47% BenchmarkCompactBinary0 804 571 -28.98% BenchmarkCompactBool_1 1210 589 -51.32% BenchmarkCompactByte_1 1511 735 -51.36% BenchmarkCompactI16_1 2834 1136 -59.92% BenchmarkCompactI32_1 3598 1414 -60.70% BenchmarkCompactI64_1 7338 2684 -63.42% BenchmarkCompactDouble1 3832 1663 -56.60% BenchmarkCompactString1 2947 1266 -57.04% BenchmarkCompactBinary1 902 694 -23.06% BenchmarkCompactBool_2 1576 477 -69.73% BenchmarkCompactByte_2 1867 571 -69.42% BenchmarkCompactI16_2 3226 970 -69.93% BenchmarkCompactI32_2 4035 1111 -72.47% BenchmarkCompactI64_2 7665 1922 -74.92% BenchmarkCompactDouble2 4250 1870 -56.00% BenchmarkCompactString2 3416 1208 -64.64% BenchmarkCompactBinary2 1397 756 -45.88% benchmark old allocs new allocs delta BenchmarkBinaryBool_0 6 0 -100.00% BenchmarkBinaryByte_0 8 0 -100.00% BenchmarkBinaryI16_0 1 0 -100.00% BenchmarkBinaryI32_0 1 0 -100.00% BenchmarkBinaryI64_0 1 0 -100.00% BenchmarkBinaryDouble_0 1 0 -100.00% BenchmarkBinaryString_0 13 4 -69.23% BenchmarkBinaryBinary_0 1 1 0.00% BenchmarkBinaryBool_1 6 0 -100.00% BenchmarkBinaryByte_1 8 0 -100.00% BenchmarkBinaryI16_1 1 0 -100.00% BenchmarkBinaryI32_1 1 0 -100.00% BenchmarkBinaryI64_1 1 0 -100.00% BenchmarkBinaryDouble_1 1 0 -100.00% BenchmarkBinaryString_1 13 4 -69.23% BenchmarkBinaryBinary_1 1 1 0.00% BenchmarkBinaryBool_2 10 0 -100.00% BenchmarkBinaryByte_2 12 0 -100.00% BenchmarkBinaryI16_2 5 0 -100.00% BenchmarkBinaryI32_2 5 0 -100.00% BenchmarkBinaryI64_2 5 0 -100.00% BenchmarkBinaryDouble_2 5 0 -100.00% BenchmarkBinaryString_2 17 4 -76.47% BenchmarkBinaryBinary_2 5 1 -80.00% BenchmarkCompactBool_0 12 0 -100.00% BenchmarkCompactByte_0 16 0 -100.00% BenchmarkCompactI16_0 25 0 -100.00% BenchmarkCompactI32_0 33 0 -100.00% BenchmarkCompactI64_0 70 0 -100.00% BenchmarkCompactDouble0 30 0 -100.00% BenchmarkCompactString0 24 4 -83.33% BenchmarkCompactBinary0 4 1 -75.00% BenchmarkCompactBool_1 12 0 -100.00% BenchmarkCompactByte_1 16 0 -100.00% BenchmarkCompactI16_1 25 0 -100.00% BenchmarkCompactI32_1 33 0 -100.00% BenchmarkCompactI64_1 70 0 -100.00% BenchmarkCompactDouble1 30 0 -100.00% BenchmarkCompactString1 24 4 -83.33% BenchmarkCompactBinary1 4 1 -75.00% BenchmarkCompactBool_2 16 0 -100.00% BenchmarkCompactByte_2 20 0 -100.00% BenchmarkCompactI16_2 29 0 -100.00% BenchmarkCompactI32_2 37 0 -100.00% BenchmarkCompactI64_2 74 0 -100.00% BenchmarkCompactDouble2 34 0 -100.00% BenchmarkCompactString2 28 4 -85.71% BenchmarkCompactBinary2 8 1 -87.50% benchmark old bytes new bytes delta BenchmarkBinaryBool_0 48 0 -100.00% BenchmarkBinaryByte_0 64 0 -100.00% BenchmarkBinaryI16_0 8 0 -100.00% BenchmarkBinaryI32_0 8 0 -100.00% BenchmarkBinaryI64_0 8 0 -100.00% BenchmarkBinaryDouble_0 8 0 -100.00% BenchmarkBinaryString_0 344 112 -67.44% BenchmarkBinaryBinary_0 160 160 0.00% BenchmarkBinaryBool_1 48 0 -100.00% BenchmarkBinaryByte_1 64 0 -100.00% BenchmarkBinaryI16_1 8 0 -100.00% BenchmarkBinaryI32_1 8 0 -100.00% BenchmarkBinaryI64_1 8 0 -100.00% BenchmarkBinaryDouble_1 8 0 -100.00% BenchmarkBinaryString_1 344 112 -67.44% BenchmarkBinaryBinary_1 160 160 0.00% BenchmarkBinaryBool_2 192 0 -100.00% BenchmarkBinaryByte_2 208 0 -100.00% BenchmarkBinaryI16_2 168 0 -100.00% BenchmarkBinaryI32_2 184 0 -100.00% BenchmarkBinaryI64_2 248 0 -100.00% BenchmarkBinaryDouble_2 264 0 -100.00% BenchmarkBinaryString_2 584 112 -80.82% BenchmarkBinaryBinary_2 448 160 -64.29% BenchmarkCompactBool_0 96 0 -100.00% BenchmarkCompactByte_0 128 0 -100.00% BenchmarkCompactI16_0 200 0 -100.00% BenchmarkCompactI32_0 264 0 -100.00% BenchmarkCompactI64_0 664 0 -100.00% BenchmarkCompactDouble0 240 0 -100.00% BenchmarkCompactString0 432 112 -74.07% BenchmarkCompactBinary0 184 160 -13.04% BenchmarkCompactBool_1 96 0 -100.00% BenchmarkCompactByte_1 128 0 -100.00% BenchmarkCompactI16_1 200 0 -100.00% BenchmarkCompactI32_1 264 0 -100.00% BenchmarkCompactI64_1 664 0 -100.00% BenchmarkCompactDouble1 240 0 -100.00% BenchmarkCompactString1 432 112 -74.07% BenchmarkCompactBinary1 184 160 -13.04% BenchmarkCompactBool_2 232 0 -100.00% BenchmarkCompactByte_2 264 0 -100.00% BenchmarkCompactI16_2 344 0 -100.00% BenchmarkCompactI32_2 424 0 -100.00% BenchmarkCompactI64_2 856 0 -100.00% BenchmarkCompactDouble2 496 0 -100.00% BenchmarkCompactString2 656 112 -82.93% BenchmarkCompactBinary2 472 160 -66.10% {noformat} > Optimize go implementations of binary and compact protocols for speed > --------------------------------------------------------------------- > > Key: THRIFT-2502 > URL: https://issues.apache.org/jira/browse/THRIFT-2502 > Project: Thrift > Issue Type: Improvement > Components: Go - Library > Reporter: Aleksey Pesternikov > Priority: Minor > > Go implementation of binary and compact protocols are slow and creating > unnecessary memory garbage -- This message was sent by Atlassian JIRA (v6.2#6252)