Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for foo666666 (0.1 sec)

  1. src/cmd/compile/internal/test/switch_test.go

    	benchmarkSwitchString(b, false)
    }
    func benchmarkSwitchString(b *testing.B, predictable bool) {
    	a := []string{
    		"foo",
    		"foo1",
    		"foo22",
    		"foo333",
    		"foo4444",
    		"foo55555",
    		"foo666666",
    		"foo7777777",
    	}
    	n := 0
    	rng := newRNG()
    	for i := 0; i < b.N; i++ {
    		rng = rng.next(predictable)
    		switch a[rng.value()&7] {
    		case "foo":
    			n += 1
    		case "foo1":
    			n += 2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.2K bytes
    - Viewed (0)
Back to top