Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkGoMapClear (0.13 sec)

  1. src/runtime/map_benchmark_test.go

    }
    
    func BenchmarkComplexAlgMap(b *testing.B) {
    	m := make(map[ComplexAlgKey]bool)
    	var k ComplexAlgKey
    	m[k] = true
    	for i := 0; i < b.N; i++ {
    		_ = m[k]
    	}
    }
    
    func BenchmarkGoMapClear(b *testing.B) {
    	b.Run("Reflexive", func(b *testing.B) {
    		for size := 1; size < 100000; size *= 10 {
    			b.Run(strconv.Itoa(size), func(b *testing.B) {
    				m := make(map[int]int, size)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 09 16:41:16 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top