Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for memhashFallback (0.56 sec)

  1. src/runtime/hash32.go

    	a, b := mix32(uint32(seed), uint32(8^hashkey[0]))
    	a ^= readUnaligned32(p)
    	b ^= readUnaligned32(add(p, 4))
    	a, b = mix32(a, b)
    	a, b = mix32(a, b)
    	return uintptr(a ^ b)
    }
    
    func memhashFallback(p unsafe.Pointer, seed, s uintptr) uintptr {
    
    	a, b := mix32(uint32(seed), uint32(s^hashkey[0]))
    	if s == 0 {
    		return uintptr(a ^ b)
    	}
    	for ; s > 8; s -= 8 {
    		a ^= readUnaligned32(p)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  2. src/runtime/hash64.go

    package runtime
    
    import (
    	"runtime/internal/math"
    	"unsafe"
    )
    
    const (
    	m5 = 0x1d8e4e27c47d124f
    )
    
    func memhashFallback(p unsafe.Pointer, seed, s uintptr) uintptr {
    	var a, b uintptr
    	seed ^= hashkey[0]
    	switch {
    	case s == 0:
    		return seed
    	case s < 4:
    		a = uintptr(*(*byte)(p))
    		a |= uintptr(*(*byte)(add(p, s>>1))) << 8
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 19 17:39:28 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  3. src/runtime/alg.go

    // See go.dev/issue/67401.
    //
    //go:linkname strhash
    func strhash(p unsafe.Pointer, h uintptr) uintptr
    
    func strhashFallback(a unsafe.Pointer, h uintptr) uintptr {
    	x := (*stringStruct)(a)
    	return memhashFallback(x.str, h, uintptr(x.len))
    }
    
    // NOTE: Because NaN != NaN, a map can contain any
    // number of (mostly useless) entries keyed with NaNs.
    // To avoid long hash chains, we assign a random number
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  4. src/runtime/map_test.go

    func TestMemHashGlobalSeed(t *testing.T) {
    	if os.Getenv("GO_TEST_SUBPROCESS_HASH") != "" {
    		fmt.Println(computeHash())
    		os.Exit(0)
    		return
    	}
    
    	testenv.MustHaveExec(t)
    
    	// aeshash and memhashFallback use separate per-process seeds, so test
    	// both.
    	t.Run("aes", func(t *testing.T) {
    		if !*runtime.UseAeshash {
    			t.Skip("No AES")
    		}
    
    		h1 := subprocessHash(t, "")
    		t.Logf("%d", h1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 33.5K bytes
    - Viewed (0)
Back to top