There is no difference in the compiled code between the two, so it should not affect your results. Take the following example file:
package foo
func foo() string {
x := "Foo"
return x
}
const MY_STRING = "Bar"
func bar() string {
x := MY_STRING
return x
}
The assembler output shows that the two functions are the same (modulo the different string constants):
$ go tool 6g -S foo.go
--- prog list "foo" ---
0000 (foo.go:3) TEXT foo+0(SB),$0-16
0001 (foo.go:3) FUNCDATA $0,gcargs·0+0(SB)
0002 (foo.go:3) FUNCDATA $1,gclocals·0+0(SB)
0003 (foo.go:3) TYPE ~anon0+0(FP){string},$16
0004 (foo.go:4) LEAQ go.string."Foo"+0(SB),BX
0005 (foo.go:4) MOVQ (BX),CX
0006 (foo.go:4) MOVQ 8(BX),BP
0007 (foo.go:5) MOVQ CX,~anon0+0(FP)
0008 (foo.go:5) MOVQ BP,~anon0+8(FP)
0009 (foo.go:5) RET ,
--- prog list "bar" ---
0010 (foo.go:10) TEXT bar+0(SB),$0-16
0011 (foo.go:10) FUNCDATA $0,gcargs·1+0(SB)
0012 (foo.go:10) FUNCDATA $1,gclocals·1+0(SB)
0013 (foo.go:10) TYPE ~anon0+0(FP){string},$16
0014 (foo.go:11) LEAQ go.string."Bar"+0(SB),BX
0015 (foo.go:11) MOVQ (BX),CX
0016 (foo.go:11) MOVQ 8(BX),BP
0017 (foo.go:12) MOVQ CX,~anon0+0(FP)
0018 (foo.go:12) MOVQ BP,~anon0+8(FP)
0019 (foo.go:12) RET ,
As you can see, the string constant is loaded the same way in both cases.