Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkEqual (0.11 sec)

  1. src/bytes/bytes_test.go

    		for i := 0; i < b.N; i++ {
    			j := IndexRune(buf, needle)
    			if j != n {
    				b.Fatal("bad index", j)
    			}
    		}
    		for i := range buf {
    			buf[i] = '\x00'
    		}
    	}
    }
    
    func BenchmarkEqual(b *testing.B) {
    	b.Run("0", func(b *testing.B) {
    		var buf [4]byte
    		buf1 := buf[0:0]
    		buf2 := buf[1:1]
    		for i := 0; i < b.N; i++ {
    			eq := Equal(buf1, buf2)
    			if !eq {
    				b.Fatal("bad equal")
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
Back to top