func SliceContainsV0(s []uint8, target uint8) bool {
return slices.Contains(s, target)
}
func SliceContainsV1(s []uint8, target uint8) bool/Users/igorwalther/Goland Projects/golangconf-2024
func main() {
println("Hello, GolangConf-2024!")
}. BLOCK tc(1) # main.go:4:9
. BLOCK-List
. . CALLFUNC Walked tc(1) # main.go:4:9
. . CALLFUNC-Fun
. . . NAME-runtime.printlock Class:PFUNC Offset:0 Used F
. . CALLFUNC Walked tc(1) # main.go:4:9
. . CALLFUNC-Fun
. . . NAME-runtime.printstring Class:PFUNC Offset:0 Used
. . CALLFUNC-Args
. . . LITERAL-"Hello, GolangConf-2024!\n" string tc(1) #
. . CALLFUNC Walked tc(1) # main.go:4:9
. . CALLFUNC-Fun
. . . NAME-runtime.printunlock Class:PFUNC Offset: 0 Usedb1:
v2 (?) = SB <uintptr> : SB
v1 (?) = InitMem <mem>
v4 (+4) = CALLstatic <mem>
{AuxCall{runtime.printlock}} v1
v5 (4) SelectN <mem> [0] v4
v14 (4) = MOVDaddr <*uint8> {go:string."Hello, GolangConf-2024!\n"} v2 : R0
v13 (4) MOVD const <int> [24] : R1
v7 (4) CALLstatic <mem>
{AuxCall{runtime.printstring}} [16] v14 v13 v5 :
<>
v8 (4) = SelectN <mem> [0] v7
v9 (4) = CALLstatic <mem>
{AuxCall{runtime.printunlock}} v8
v10 (4) = SelectN <mem> [0] v9
v11 (+5)= MakeResult <mem> v10
Ret v11 (5) # /Users/igorwalther/GolandProjects/golangconf-2024/main.go
00000 (3) TEXT main.main(SB), ABIInternal
00001 (3) FUNCDATA $0, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
00002 (3) FUNCDATA $1, gclocals·g2BeySu+wFnoycgXfElmcg==(SB)
v4 00003 (+4) PCDATA $1, $0
v4 00004 (+4) CALL runtime.printlock(SB)
v14 00005 (4) MOVD $go:string."Hello, GolangConf-2024!\n" (SB), R0
v13 00006 (4) MOVD $24, R1
v7 00007 (4) CALL runtime.printstring (SB)
v9 00008 (4) CALL runtime.printunlock (SB)
b1 00009 (5) RET
00010 (?) END«We’re looking at how to support the latest vector and matrix hardware instructions»
© The Go Blog: Austin Clements
«Also, perhaps most important: it is how we talk about the machine. Knowing assembly, even a little, means understanding computers better»
© GopherCon 2016: Rob Pike