Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for crcHashMod (0.52 sec)

  1. cmd/erasure-sets_test.go

    		testCase := testCase
    		key := randString(testCase.key)
    		b.Run("", func(b *testing.B) {
    			b.SetBytes(1024)
    			b.ReportAllocs()
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				crcHashMod(key, 16)
    			}
    		})
    	}
    }
    
    func BenchmarkSipHash(b *testing.B) {
    	cases := []struct {
    		key int
    	}{
    		{16},
    		{64},
    		{128},
    		{256},
    		{512},
    		{1024},
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 12 07:21:56 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  2. cmd/erasure-sets.go

    }
    
    func crcHashMod(key string, cardinality int) int {
    	if cardinality <= 0 {
    		return -1
    	}
    	keyCrc := crc32.Checksum([]byte(key), crc32.IEEETable)
    	return int(keyCrc % uint32(cardinality))
    }
    
    func hashKey(algo string, key string, cardinality int, id [16]byte) int {
    	switch algo {
    	case formatErasureVersionV2DistributionAlgoV1:
    		return crcHashMod(key, cardinality)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 37.7K bytes
    - Viewed (0)
Back to top