Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkCompareBytesDifferentLength (0.26 sec)

  1. src/bytes/compare_test.go

    	b1 := []byte("Hello Gophers!")
    	b2 := []byte("Hello, Gophers")
    	for i := 0; i < b.N; i++ {
    		if Compare(b1, b2) != -1 {
    			b.Fatal("b1 < b2 failed")
    		}
    	}
    }
    
    func BenchmarkCompareBytesDifferentLength(b *testing.B) {
    	b1 := []byte("Hello Gophers!")
    	b2 := []byte("Hello, Gophers!")
    	for i := 0; i < b.N; i++ {
    		if Compare(b1, b2) != -1 {
    			b.Fatal("b1 < b2 failed")
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Jul 13 23:11:42 GMT 2023
    - 6.8K bytes
    - Viewed (0)
Back to top