Descriptionproto: make safe for App Engine
Factor unsafe code into its own file that can be replaced with
reflect code when building for App Engine.
benchmark old MB/s new MB/s speedup
BenchmarkMarshal 126.34 120.38 0.95x
BenchmarkUnmarshal 111.84 110.78 0.99x
BenchmarkMarshalBytes 893.70 853.55 0.96x
BenchmarkUnmarshalBytes 615.23 619.73 1.01x
Comparing the two new variants, old = unsafe, new = reflect:
benchmark old MB/s new MB/s speedup
BenchmarkMarshal 120.38 50.52 0.42x
BenchmarkUnmarshal 110.78 20.12 0.18x
BenchmarkMarshalBytes 853.55 182.21 0.21x
BenchmarkUnmarshalBytes 619.73 227.66 0.37x
But really these numbers are unfair since they ignore the
qualitative difference: proto was completely unavailable
on App Engine, and now it can be run there.
Patch Set 1 #Patch Set 2 : diff -r 6d035089ba19 https://code.google.com/p/goprotobuf #Patch Set 3 : diff -r 6d035089ba19 https://code.google.com/p/goprotobuf #Patch Set 4 : diff -r 6d035089ba19 https://code.google.com/p/goprotobuf #
Total comments: 5
Patch Set 5 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #Patch Set 6 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #Patch Set 7 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #
Total comments: 7
Patch Set 8 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #Patch Set 9 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #Patch Set 10 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #Patch Set 11 : diff -r 3449773d11ed https://code.google.com/p/goprotobuf #
MessagesTotal messages: 22
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||