You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking bug.
It'd be nice if sort could work on stack values.
The CL experimented with forking part of the sort package so escape analysis permitted
sorting an array on the stack:
http://golang.org/cl/6265047/diff/3/src/pkg/net/http/header.go
For reference, at 5b56c2c0597f on gopher.mtv with no modifications:
$ go test -v -run=^$ -bench=Subset
PASS
BenchmarkHeaderWriteSubset 500000 3050 ns/op
ok net/http 1.569s
With the version of CL linked above (Patch Set 4, despite URL saying /3/)
BenchmarkHeaderWriteSubset 1000000 1983 ns/op
That's not all from sort, but IIRC a lot was.
Related: net/url.Values.Encode could also benefit from a sorting stack values.
The text was updated successfully, but these errors were encountered:
As of today, on the same machine as the original report:
bradfitz@gopher:~/go/src$ hg id
91db139d15e5+ tip
$ go test -run=XXX -bench=Subset net/http
PASS
BenchmarkHeaderWriteSubset 500000 2354 ns/op 197 B/op 2 allocs/op
The text was updated successfully, but these errors were encountered: