Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkAppendInts (0.2 sec)

  1. src/encoding/binary/binary_test.go

    		Write(w, BigEndian, s.Uint64)
    	}
    	b.StopTimer()
    	if b.N > 0 && !bytes.Equal(buf.Bytes(), big[:30]) {
    		b.Fatalf("first half doesn't match: %x %x", buf.Bytes(), big[:30])
    	}
    }
    
    func BenchmarkAppendInts(b *testing.B) {
    	buf := make([]byte, 0, 256)
    	b.SetBytes(2 * (1 + 2 + 4 + 8))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		buf = buf[:0]
    		buf, _ = Append(buf, BigEndian, s.Int8)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
Back to top