Using the == symbol in golang and using a loop to compare if string a equals string b,which performance is better?
for i:=0;i
and just
a == b
I've found that the same string have different address
a := "abc"
b := "abc"
println(&a)
println(&b)
answer is :
0xc420045f68
0xc420045f58
so == not using address to compare.
In fact, I would like to know how == compares two strings.
I am searching for a long time on net. But failed...