Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkChaCha8Read (0.33 sec)

  1. src/math/rand/v2/chacha8_test.go

    	}
    }
    
    func BenchmarkChaCha8(b *testing.B) {
    	p := NewChaCha8([32]byte{1, 2, 3, 4, 5})
    	var t uint64
    	for n := b.N; n > 0; n-- {
    		t += p.Uint64()
    	}
    	Sink = t
    }
    
    func BenchmarkChaCha8Read(b *testing.B) {
    	p := NewChaCha8([32]byte{1, 2, 3, 4, 5})
    	buf := make([]byte, 32)
    	b.SetBytes(32)
    	var t uint8
    	for n := b.N; n > 0; n-- {
    		p.Read(buf)
    		t += buf[0]
    	}
    	Sink = uint64(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:09:08 UTC 2024
    - 55K bytes
    - Viewed (0)
Back to top