Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for MapBucketCountBits (0.36 sec)

  1. src/internal/abi/map.go

    // Map constants common to several packages
    // runtime/runtime-gdb.py:MapTypePrinter contains its own copy
    const (
    	// Maximum number of key/elem pairs a bucket can hold.
    	MapBucketCountBits = 3 // log2 of number of elements in a bucket.
    	MapBucketCount     = 1 << MapBucketCountBits
    
    	// Maximum key or elem size to keep inline (instead of mallocing per element).
    	// Must fit in a uint8.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 20:09:01 UTC 2024
    - 719 bytes
    - Viewed (0)
  2. src/runtime/map_test.go

    	}
    }
    
    func TestMapIterOrder(t *testing.T) {
    	sizes := []int{3, 7, 9, 15}
    	if abi.MapBucketCountBits >= 5 {
    		// it gets flaky (often only one iteration order) at size 3 when abi.MapBucketCountBits >=5.
    		t.Fatalf("This test becomes flaky if abi.MapBucketCountBits(=%d) is 5 or larger", abi.MapBucketCountBits)
    	}
    	for _, n := range sizes {
    		for i := 0; i < 1000; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  3. src/runtime/map.go

    import (
    	"internal/abi"
    	"internal/goarch"
    	"internal/runtime/atomic"
    	"runtime/internal/math"
    	"unsafe"
    )
    
    const (
    	// Maximum number of key/elem pairs a bucket can hold.
    	bucketCntBits = abi.MapBucketCountBits
    
    	// Maximum average load of a bucket that triggers growth is bucketCnt*13/16 (about 80% full)
    	// Because of minimum alignment rules, bucketCnt is known to be at least 8.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
Back to top