|
|
|
Created:
11 years, 2 months ago by rsc Modified:
11 years, 2 months ago Reviewers:
Visibility:
Public. |
reflect: shorten Value to 2 words
This is an experiment.
Method values are not implemented yet.
They will have to set ptr = a pointer to
a struct containing the method index
and the original Value.
That means Method will have to allocate,
but that's not too big a loss.
The new Value is more compact but a little slower:
benchmark old MB/s new MB/s speedup
BenchmarkGobDecode 52.14 51.21 0.98x
BenchmarkGobEncode 58.12 56.42 0.97x
BenchmarkJSONEncode 70.91 68.12 0.96x
BenchmarkJSONDecode 18.98 18.29 0.96x
BenchmarkTemplate 14.62 15.09 1.03x
Patch Set 1 #Patch Set 2 : diff -r 2fafe84a2de77dfff6e9ed3b97d6cbfebf6d7c38 https://code.google.com/p/go/ #Patch Set 3 : diff -r a1d988c922a3f110cb949813ad10f274acfdeef9 https://code.google.com/p/go/ #
|
|||||||||||||||||||||||||||||||||||||||