Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Go 1.7 changes #58

Merged
merged 11 commits into from
Oct 16, 2016
Merged

Backport Go 1.7 changes #58

merged 11 commits into from
Oct 16, 2016

Conversation

klauspost
Copy link
Owner

Some changes were done to the submitted Go 1.7 optimizations because of SSA compiler optimizations.

This gives a modest speedup when backported here. Bitwriter functions are the same as Go, since functionality was the same, but was cleaned up a lot. Other changes remain.

benchmark                              old MB/s     new MB/s     speedup
BenchmarkEncodeDigitsConstant1e4-8     243.54       243.64       1.00x
BenchmarkEncodeDigitsConstant1e5-8     255.91       252.48       0.99x
BenchmarkEncodeDigitsConstant1e6-8     252.43       260.45       1.03x
BenchmarkEncodeDigitsSpeed1e4-8        65.19        62.61        0.96x
BenchmarkEncodeDigitsSpeed1e5-8        92.48        94.67        1.02x
BenchmarkEncodeDigitsSpeed1e6-8        156.02       159.00       1.02x
BenchmarkEncodeDigitsDefault1e4-8      34.86        34.95        1.00x
BenchmarkEncodeDigitsDefault1e5-8      27.94        28.72        1.03x
BenchmarkEncodeDigitsDefault1e6-8      27.12        27.87        1.03x
BenchmarkEncodeDigitsCompress1e4-8     29.28        29.63        1.01x
BenchmarkEncodeDigitsCompress1e5-8     20.37        21.29        1.05x
BenchmarkEncodeDigitsCompress1e6-8     19.85        20.29        1.02x
BenchmarkEncodeTwainConstant1e4-8      167.29       174.80       1.04x
BenchmarkEncodeTwainConstant1e5-8      217.95       230.53       1.06x
BenchmarkEncodeTwainConstant1e6-8      215.76       226.18       1.05x
BenchmarkEncodeTwainSpeed1e4-8         60.93        59.34        0.97x
BenchmarkEncodeTwainSpeed1e5-8         64.85        68.07        1.05x
BenchmarkEncodeTwainSpeed1e6-8         61.31        71.03        1.16x
BenchmarkEncodeTwainDefault1e4-8       30.08        31.10        1.03x
BenchmarkEncodeTwainDefault1e5-8       36.81        37.85        1.03x
BenchmarkEncodeTwainDefault1e6-8       37.43        37.57        1.00x
BenchmarkEncodeTwainCompress1e4-8      26.44        27.08        1.02x
BenchmarkEncodeTwainCompress1e5-8      16.96        17.78        1.05x
BenchmarkEncodeTwainCompress1e6-8      15.10        16.52        1.09x

Some changes were done to the submitted Go 1.7 optimizations because of SSA compiler optimizations.

This gives a modest speedup when backported here. Bitwriter functions are the same as Go, since functionality was the same, but was cleaned up a lot. Other changes remain.

benchmark                              old MB/s     new MB/s     speedup
BenchmarkEncodeDigitsConstant1e4-8     243.54       243.64       1.00x
BenchmarkEncodeDigitsConstant1e5-8     255.91       252.48       0.99x
BenchmarkEncodeDigitsConstant1e6-8     252.43       260.45       1.03x
BenchmarkEncodeDigitsSpeed1e4-8        65.19        62.61        0.96x
BenchmarkEncodeDigitsSpeed1e5-8        92.48        94.67        1.02x
BenchmarkEncodeDigitsSpeed1e6-8        156.02       159.00       1.02x
BenchmarkEncodeDigitsDefault1e4-8      34.86        34.95        1.00x
BenchmarkEncodeDigitsDefault1e5-8      27.94        28.72        1.03x
BenchmarkEncodeDigitsDefault1e6-8      27.12        27.87        1.03x
BenchmarkEncodeDigitsCompress1e4-8     29.28        29.63        1.01x
BenchmarkEncodeDigitsCompress1e5-8     20.37        21.29        1.05x
BenchmarkEncodeDigitsCompress1e6-8     19.85        20.29        1.02x
BenchmarkEncodeTwainConstant1e4-8      167.29       174.80       1.04x
BenchmarkEncodeTwainConstant1e5-8      217.95       230.53       1.06x
BenchmarkEncodeTwainConstant1e6-8      215.76       226.18       1.05x
BenchmarkEncodeTwainSpeed1e4-8         60.93        59.34        0.97x
BenchmarkEncodeTwainSpeed1e5-8         64.85        68.07        1.05x
BenchmarkEncodeTwainSpeed1e6-8         61.31        71.03        1.16x
BenchmarkEncodeTwainDefault1e4-8       30.08        31.10        1.03x
BenchmarkEncodeTwainDefault1e5-8       36.81        37.85        1.03x
BenchmarkEncodeTwainDefault1e6-8       37.43        37.57        1.00x
BenchmarkEncodeTwainCompress1e4-8      26.44        27.08        1.02x
BenchmarkEncodeTwainCompress1e5-8      16.96        17.78        1.05x
BenchmarkEncodeTwainCompress1e6-8      15.10        16.52        1.09x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant