Created
October 18, 2016 19:25
-
-
Save dgryski/08a6e82f0e342060c3a80230c09a914c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# github.com/dgryski/w | |
"".BenchmarkBar t=1 size=35 args=0x8 locals=0x0 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:9) TEXT "".BenchmarkBar(SB), $0-8 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:9) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:9) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:9) FUNCDATA $0, gclocals·87d20ce1b58390b294df80b886db78bf(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:9) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) MOVQ "".b+8(FP), AX | |
0x0005 00005 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) MOVQ $0, CX | |
0x0007 00007 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) MOVQ 184(AX), DX | |
0x000e 00014 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) CMPQ CX, DX | |
0x0011 00017 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) JGE $0, 34 | |
0x0013 00019 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) INCQ CX | |
0x0016 00022 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) MOVQ 184(AX), DX | |
0x001d 00029 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) CMPQ CX, DX | |
0x0020 00032 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:10) JLT $0, 19 | |
0x0022 00034 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:13) RET | |
0x0000 48 8b 44 24 08 31 c9 48 8b 90 b8 00 00 00 48 39 H.D$.1.H......H9 | |
0x0010 d1 7d 0f 48 ff c1 48 8b 90 b8 00 00 00 48 39 d1 .}.H..H......H9. | |
0x0020 7c f1 c3 |.. | |
"".BenchmarkLocal t=1 size=35 args=0x8 locals=0x0 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:15) TEXT "".BenchmarkLocal(SB), $0-8 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:15) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:15) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:15) FUNCDATA $0, gclocals·87d20ce1b58390b294df80b886db78bf(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:15) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) MOVQ "".b+8(FP), AX | |
0x0005 00005 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:16) MOVQ $0, CX | |
0x0007 00007 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) MOVQ 184(AX), DX | |
0x000e 00014 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) CMPQ CX, DX | |
0x0011 00017 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) JGE $0, 34 | |
0x0013 00019 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) INCQ CX | |
0x0016 00022 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) MOVQ 184(AX), DX | |
0x001d 00029 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) CMPQ CX, DX | |
0x0020 00032 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:17) JLT $0, 19 | |
0x0022 00034 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:20) RET | |
0x0000 48 8b 44 24 08 31 c9 48 8b 90 b8 00 00 00 48 39 H.D$.1.H......H9 | |
0x0010 d1 7d 0f 48 ff c1 48 8b 90 b8 00 00 00 48 39 d1 .}.H..H......H9. | |
0x0020 7c f1 c3 |.. | |
"".BenchmarkGlobal t=1 size=53 args=0x8 locals=0x0 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:24) TEXT "".BenchmarkGlobal(SB), $0-8 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:24) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:24) NOP | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:24) FUNCDATA $0, gclocals·87d20ce1b58390b294df80b886db78bf(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:24) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) MOVQ "".b+8(FP), AX | |
0x0005 00005 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) MOVQ $0, CX | |
0x0007 00007 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) MOVQ 184(AX), DX | |
0x000e 00014 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) CMPQ CX, DX | |
0x0011 00017 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) JGE $0, 52 | |
0x0013 00019 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:26) MOVQ "".global(SB), DX | |
0x001a 00026 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:26) ADDQ $11, DX | |
0x001e 00030 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:26) MOVQ DX, "".global(SB) | |
0x0025 00037 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) INCQ CX | |
0x0028 00040 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) MOVQ 184(AX), DX | |
0x002f 00047 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) CMPQ CX, DX | |
0x0032 00050 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:25) JLT $0, 19 | |
0x0034 00052 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:28) RET | |
0x0000 48 8b 44 24 08 31 c9 48 8b 90 b8 00 00 00 48 39 H.D$.1.H......H9 | |
0x0010 d1 7d 21 48 8b 15 00 00 00 00 48 83 c2 0b 48 89 .}!H......H...H. | |
0x0020 15 00 00 00 00 48 ff c1 48 8b 90 b8 00 00 00 48 .....H..H......H | |
0x0030 39 d1 7c df c3 9.|.. | |
rel 22+4 t=14 "".global+0 | |
rel 33+4 t=14 "".global+0 | |
"".init t=1 size=61 args=0x0 locals=0x0 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) TEXT "".init(SB), $0-0 | |
0x0000 00000 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) MOVQ (TLS), CX | |
0x0009 00009 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) CMPQ SP, 16(CX) | |
0x000d 00013 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) JLS 54 | |
0x000f 00015 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) NOP | |
0x000f 00015 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) NOP | |
0x000f 00015 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) | |
0x000f 00015 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) | |
0x000f 00015 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) MOVBLZX "".initdone·(SB), AX | |
0x0016 00022 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) CMPB AL, $1 | |
0x0018 00024 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) JLS $0, 27 | |
0x001a 00026 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) RET | |
0x001b 00027 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) JNE $0, 34 | |
0x001d 00029 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) PCDATA $0, $0 | |
0x001d 00029 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) CALL runtime.throwinit(SB) | |
0x0022 00034 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) MOVB $1, "".initdone·(SB) | |
0x0029 00041 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) PCDATA $0, $0 | |
0x0029 00041 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) CALL testing.init(SB) | |
0x002e 00046 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) MOVB $2, "".initdone·(SB) | |
0x0035 00053 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) RET | |
0x0036 00054 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) NOP | |
0x0036 00054 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) CALL runtime.morestack_noctxt(SB) | |
0x003b 00059 (/home/dgryski/Dropbox/GITS/gocode/src/github.com/dgryski/w/main_test.go:29) JMP 0 | |
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 27 0f dH..%....H;a.v'. | |
0x0010 b6 05 00 00 00 00 3c 01 76 01 c3 75 05 e8 00 00 ......<.v..u.... | |
0x0020 00 00 c6 05 00 00 00 00 01 e8 00 00 00 00 c6 05 ................ | |
0x0030 00 00 00 00 02 c3 e8 00 00 00 00 eb c3 ............. | |
rel 5+4 t=15 TLS+0 | |
rel 18+4 t=14 "".initdone·+0 | |
rel 30+4 t=7 runtime.throwinit+0 | |
rel 36+4 t=14 "".initdone·+-1 | |
rel 42+4 t=7 testing.init+0 | |
rel 48+4 t=14 "".initdone·+-1 | |
rel 55+4 t=7 runtime.morestack_noctxt+0 | |
gclocals·33cdeccccebe80329f1fdbee7f5874cb t=9 dupok size=8 | |
0x0000 01 00 00 00 00 00 00 00 ........ | |
gclocals·87d20ce1b58390b294df80b886db78bf t=9 dupok size=12 | |
0x0000 01 00 00 00 01 00 00 00 01 00 00 00 ............ | |
"".global t=34 size=8 | |
"".initdone· t=34 size=1 | |
"".BenchmarkBar·f t=9 dupok size=8 | |
0x0000 00 00 00 00 00 00 00 00 ........ | |
rel 0+8 t=1 "".BenchmarkBar+0 | |
"".BenchmarkLocal·f t=9 dupok size=8 | |
0x0000 00 00 00 00 00 00 00 00 ........ | |
rel 0+8 t=1 "".BenchmarkLocal+0 | |
"".BenchmarkGlobal·f t=9 dupok size=8 | |
0x0000 00 00 00 00 00 00 00 00 ........ | |
rel 0+8 t=1 "".BenchmarkGlobal+0 | |
"".init·f t=9 dupok size=8 | |
0x0000 00 00 00 00 00 00 00 00 ........ | |
rel 0+8 t=1 "".init+0 | |
type..importpath.testing. t=9 dupok size=10 | |
0x0000 00 00 07 74 65 73 74 69 6e 67 ...testing | |
# github.com/dgryski/w | |
./bench.s:1: unexpected token after '#': github |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"testing" | |
) | |
const s = "some string" | |
func BenchmarkBar(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
_ = len(s) | |
} | |
} | |
func BenchmarkLocal(b *testing.B) { | |
var local int | |
for i := 0; i < b.N; i++ { | |
local += len(s) | |
} | |
} | |
var global int | |
func BenchmarkGlobal(b *testing.B) { | |
for i := 0; i < b.N; i++ { | |
global += len(s) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment