FAQ
On an old arm5 host this change shaved 300ms and 10mb off the build time
for pkg/net

dfc@qnap:~/go/src/pkg/net$ /usr/bin/time -v go build
Command being timed: "go build"
User time (seconds): 4.37
System time (seconds): 0.48
Percent of CPU this job got: 96%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.01
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 108208
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 60003
Voluntary context switches: 320
Involuntary context switches: 219
Swaps: 0
File system inputs: 0
File system outputs: 8088
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

after:

dfc@qnap:~/go/src/pkg/net$ /usr/bin/time -v go build
Command being timed: "go build"
User time (seconds): 4.09
System time (seconds): 0.47
Percent of CPU this job got: 95%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.75
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 98436
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 57511
Voluntary context switches: 322
Involuntary context switches: 216
Swaps: 0
File system inputs: 208
File system outputs: 7896
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

The results for the whole stdlibrary are even more impressive

before:

dfc@qnap:~/go/src$ /usr/bin/time -v go build -a std
Command being timed: "go build -a std"
User time (seconds): 91.40
System time (seconds): 10.33
Percent of CPU this job got: 94%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:47.15
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 195004
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 2
Minor (reclaiming a frame) page faults: 1036733
Voluntary context switches: 2608
Involuntary context switches: 1930
Swaps: 0
File system inputs: 848
File system outputs: 295064
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

after:

dfc@qnap:~/go/src$ /usr/bin/time -v go build -a std
Command being timed: "go build -a std"
User time (seconds): 81.01
System time (seconds): 8.71
Percent of CPU this job got: 97%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:32.27
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 192900
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 2
Minor (reclaiming a frame) page faults: 910154
Voluntary context switches: 2578
Involuntary context switches: 1564
Swaps: 0
File system inputs: 248
File system outputs: 288344
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

https://codereview.appspot.com/6856126/

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 7, '12 at 12:37a
activeDec 7, '12 at 8:25p
posts7
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase