- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for countGeneric (0.69 sec)
-
src/internal/bytealg/count_native.go
package bytealg //go:noescape func Count(b []byte, c byte) int //go:noescape func CountString(s string, c byte) int // A backup implementation to use by assembly. func countGeneric(b []byte, c byte) int { n := 0 for _, x := range b { if x == c { n++ } } return n } func countGenericString(s string, c byte) int { n := 0 for i := 0; i < len(s); i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 643 bytes - Viewed (0) -
src/internal/bytealg/count_amd64.s
#include "go_asm.h" #include "asm_amd64.h" #include "textflag.h" TEXT ·Count(SB),NOSPLIT,$0-40 #ifndef hasPOPCNT CMPB internal∕cpu·X86+const_offsetX86HasPOPCNT(SB), $1 JEQ 2(PC) JMP ·countGeneric(SB) #endif MOVQ b_base+0(FP), SI MOVQ b_len+8(FP), BX MOVB c+24(FP), AL LEAQ ret+32(FP), R8 JMP countbody<>(SB) TEXT ·CountString(SB),NOSPLIT,$0-32 #ifndef hasPOPCNT
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 06 20:54:43 UTC 2023 - 4.7K bytes - Viewed (0) -
src/internal/bytealg/count_generic.go
Russ Cox <******@****.***> 1629910106 -0400
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 28 18:17:57 UTC 2021 - 488 bytes - Viewed (0)