Descriptionfmt: make recursive scan more efficient.
Detect when scan is being called recursively and
re-use the same scan state.
On my machine, for a recursion-heavy benchmark, this
results in 44x speed up. This does impose a 4% penalty
on the non-recursive case, which can be removed by
heap-allocating the saved state, at 40% performance penalty
on the recursive case. Either way is fine with me.
Patch Set 1 #Patch Set 2 : diff -r 98d584670c65 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 98d584670c65 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 98d584670c65 https://go.googlecode.com/hg/ #
Total comments: 9
Patch Set 5 : diff -r 98d584670c65 https://go.googlecode.com/hg/ #
Total comments: 1
Patch Set 6 : diff -r 98d584670c65 https://go.googlecode.com/hg/ #MessagesTotal messages: 7
|