Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkRepeatSpaces (0.15 sec)

  1. src/strings/strings_test.go

    			b.Run(fmt.Sprintf("%d/%d", 1<<j, k), func(b *testing.B) {
    				for i := 0; i < b.N; i++ {
    					Repeat(s, n)
    				}
    				b.SetBytes(int64(n * len(s)))
    			})
    		}
    	}
    }
    
    func BenchmarkRepeatSpaces(b *testing.B) {
    	b.ReportAllocs()
    	for i := 0; i < b.N; i++ {
    		Repeat(" ", 2)
    	}
    }
    
    func BenchmarkIndexAnyASCII(b *testing.B) {
    	x := Repeat("#", 2048) // Never matches set
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 53K bytes
    - Viewed (0)
Back to top