Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for benchmarkSizes (0.23 sec)

  1. src/runtime/memmove_test.go

    	32, 64, 128, 256, 512, 1024, 2048, 4096,
    }
    
    func BenchmarkMemmove(b *testing.B) {
    	benchmarkSizes(b, bufSizes, func(b *testing.B, n int) {
    		x := make([]byte, n)
    		y := make([]byte, n)
    		for i := 0; i < b.N; i++ {
    			copy(x, y)
    		}
    	})
    }
    
    func BenchmarkMemmoveOverlap(b *testing.B) {
    	benchmarkSizes(b, bufSizesOverlap, func(b *testing.B, n int) {
    		x := make([]byte, n+16)
    		for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:12 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  2. src/crypto/md5/md5_test.go

    }
    
    func BenchmarkHash8Bytes(b *testing.B) {
    	benchmarkSize(b, 8, false)
    }
    
    func BenchmarkHash64(b *testing.B) {
    	benchmarkSize(b, 64, false)
    }
    
    func BenchmarkHash128(b *testing.B) {
    	benchmarkSize(b, 128, false)
    }
    
    func BenchmarkHash256(b *testing.B) {
    	benchmarkSize(b, 256, false)
    }
    
    func BenchmarkHash512(b *testing.B) {
    	benchmarkSize(b, 512, false)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 23 16:54:46 UTC 2021
    - 17.4K bytes
    - Viewed (0)
  3. src/hash/maphash/maphash_test.go

    		t.Errorf("hashes don't match: want %x, got %x", x, y)
    	}
    }
    
    // Make sure a Hash implements the hash.Hash and hash.Hash64 interfaces.
    var _ hash.Hash = &Hash{}
    var _ hash.Hash64 = &Hash{}
    
    func benchmarkSize(b *testing.B, size int) {
    	h := &Hash{}
    	buf := make([]byte, size)
    	s := string(buf)
    
    	b.Run("Write", func(b *testing.B) {
    		b.SetBytes(int64(size))
    		for i := 0; i < b.N; i++ {
    			h.Reset()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  4. src/crypto/sha1/sha1_test.go

    			Sum(buf[:size])
    		}
    	})
    }
    
    func BenchmarkHash8Bytes(b *testing.B) {
    	benchmarkSize(b, 8)
    }
    
    func BenchmarkHash320Bytes(b *testing.B) {
    	benchmarkSize(b, 320)
    }
    
    func BenchmarkHash1K(b *testing.B) {
    	benchmarkSize(b, 1024)
    }
    
    func BenchmarkHash8K(b *testing.B) {
    	benchmarkSize(b, 8192)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 21:27:16 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  5. src/cmd/internal/notsha256/sha256_test.go

    		for i := 0; i < b.N; i++ {
    			Sum256(buf[:size])
    		}
    	})
    }
    
    func BenchmarkHash8Bytes(b *testing.B) {
    	benchmarkSize(b, 8)
    }
    
    func BenchmarkHash1K(b *testing.B) {
    	benchmarkSize(b, 1024)
    }
    
    func BenchmarkHash8K(b *testing.B) {
    	benchmarkSize(b, 8192)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:17 UTC 2022
    - 16.2K bytes
    - Viewed (0)
  6. src/crypto/sha256/sha256_test.go

    		for i := 0; i < b.N; i++ {
    			Sum256(buf[:size])
    		}
    	})
    }
    
    func BenchmarkHash8Bytes(b *testing.B) {
    	benchmarkSize(b, 8)
    }
    
    func BenchmarkHash1K(b *testing.B) {
    	benchmarkSize(b, 1024)
    }
    
    func BenchmarkHash8K(b *testing.B) {
    	benchmarkSize(b, 8192)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 21:21:42 UTC 2023
    - 34.8K bytes
    - Viewed (0)
  7. src/encoding/binary/binary_test.go

    	buf := new(bytes.Buffer)
    	var w io.Writer = buf
    	b.SetBytes(1000)
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		buf.Reset()
    		Write(w, BigEndian, slice)
    	}
    }
    
    func BenchmarkSize(b *testing.B) {
    	for _, data := range sizableTypes {
    		b.Run(fmt.Sprintf("%T", data), func(b *testing.B) {
    			for range b.N {
    				_ = Size(data)
    			}
    		})
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  8. src/crypto/sha512/sha512_test.go

    		for i := 0; i < b.N; i++ {
    			Sum512(buf[:size])
    		}
    	})
    }
    
    func BenchmarkHash8Bytes(b *testing.B) {
    	benchmarkSize(b, 8)
    }
    
    func BenchmarkHash1K(b *testing.B) {
    	benchmarkSize(b, 1024)
    }
    
    func BenchmarkHash8K(b *testing.B) {
    	benchmarkSize(b, 8192)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 21:17:08 UTC 2023
    - 105.6K bytes
    - Viewed (0)
Back to top