]> Cypherpunks repositories - gostls13.git/commit
test/bench/go1: use raw string instead of string addition
authorShenghou Ma <minux.ma@gmail.com>
Mon, 4 Mar 2013 20:23:37 +0000 (04:23 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 4 Mar 2013 20:23:37 +0000 (04:23 +0800)
commit13075ed416bda45d5fcdf4722baec5c940a2ec0c
treecb266aa012b285538236876f7f2cd3a08a0c9e03
parent9744c0e175cfaf45d7fc7bdfad10618e1ba69cd6
test/bench/go1: use raw string instead of string addition
to reduce compile time memory/stack usage.
Update #4970
$ go test -c ../test/bench/go1
before:
0.36user 0.07system 0:00.44elapsed 100%CPU
(0avgtext+0avgdata 540720maxresident)k
0inputs+19840outputs (0major+56451minor)pagefaults 0swaps
after:
0.33user 0.05system 0:00.39elapsed 100%CPU
(0avgtext+0avgdata 289936maxresident)k
0inputs+19864outputs (0major+29615minor)pagefaults 0swaps

And stack usage is reduced to below 1MiB.

R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/7436050
test/bench/go1/json_test.go
test/bench/go1/jsondata_test.go