Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkCountBits (0.22 sec)

  1. pkg/registry/core/service/allocator/utils_test.go

    	}
    	for _, test := range tests {
    		actual := countBits(test.n)
    		if test.expected != actual {
    			t.Errorf("%s should have %d bits but recorded as %d", test.n, test.expected, actual)
    		}
    	}
    }
    
    func BenchmarkCountBits(b *testing.B) {
    	bigN, ok := big.NewInt(0).SetString("10000000000000000000000000000000000000000000000000000000000000000", 16)
    	if !ok {
    		b.Fatal("Failed to set bigN")
    	}
    	for i := 0; i < b.N; i++ {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 01 15:08:36 UTC 2021
    - 1.5K bytes
    - Viewed (0)
Back to top