commit | ee7e8d55c5c2c727b66e0518a8ec91d4a4a40162 | [log] [tgz] |
---|---|---|
author | Todd Wang <toddw@google.com> | Wed May 18 03:53:55 2016 -0700 |
committer | Todd Wang <toddw@google.com> | Wed May 18 17:31:50 2016 +0000 |
tree | 1af4bd15a28ad85448adc1804b18769d62f9b86d | |
parent | 67e34c8f8c877e1f0794cf66a8506bfc5e421b98 [diff] |
vdl: Add generated vars for TypeOf, for better performance. Also changed vdl.Decoder.StartValue to take a *vdl.Type argument, and perform the compatibility check. This gives up to an additional 10% improvement, and makes it easier to optimize the compatibility check in the future, since it's now only performed by the 3 decoders (vom, vdl.Value and vdl.pipe). Some numbers. In general all the generated stuff gets better: old ns/op new ns/op delta RpcRequestZeroSingleShotEncode 51010 41028 -19.57% RpcRequestZeroRepeatedEncode 302 194 -35.76% RpcRequestZeroSingleShotDecode 1962 1636 -16.62% RpcRequestZeroRepeatedDecode 484 281 -41.94% RpcRequestFullSingleShotEncode 63755 47481 -25.53% RpcRequestFullRepeatedEncode 9407 5558 -40.92% RpcRequestFullSingleShotDecode 58886 58863 -0.04% RpcRequestFullRepeatedDecode 55303 54106 -2.16% RpcResponseZeroSingleShotEncode 51700 40604 -21.46% RpcResponseZeroRepeatedEncode 635 514 -19.06% RpcResponseZeroSingleShotDecode 2026 1755 -13.38% RpcResponseZeroRepeatedDecode 524 304 -41.98% RpcResponseFullSingleShotEncode 106038 91816 -13.41% RpcResponseFullRepeatedEncode 44273 42005 -5.12% RpcResponseFullSingleShotDecode 43271 42635 -1.47% RpcResponseFullRepeatedDecode 38608 37251 -3.51% For some reason, the reflect version of large-list single-shot encoding gets much worse. I'm not sure why. But I'm going to ignore that for now, since I think there's plenty of other optimizations we can explore. old ns/op new ns/op delta LargeListSingleShotEncodeReflect 19279360 21696617 +12.54% LargeListRepeatedEncodeReflect 19055693 19550742 +2.60% LargeListSingleShotDecodeReflect 34161615 32556162 -4.70% LargeListRepeatedDecodeReflect 33647837 31846309 -5.35% LargeListSingleShotEncode 3951128 3984021 +0.83% LargeListRepeatedEncode 3870694 3895734 +0.65% LargeListSingleShotDecode 5221050 5465362 +4.68% LargeListRepeatedDecode 5211915 5246888 +0.67% MultiPart: 3/5 Change-Id: I655e0cf3662f75aaf4dd54628fcc906fbc138d62
This repository contains a reference implementation of the Vanadium APIs.
Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.