Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkMatchClass_InRange (0.34 sec)

  1. src/regexp/all_test.go

    	x := strings.Repeat("xxxx", 20) + "w"
    	re := MustCompile("[abcdw]")
    	b.StartTimer()
    	for i := 0; i < b.N; i++ {
    		if !re.MatchString(x) {
    			b.Fatalf("no match!")
    		}
    	}
    }
    
    func BenchmarkMatchClass_InRange(b *testing.B) {
    	b.StopTimer()
    	// 'b' is between 'a' and 'c', so the charclass
    	// range checking is no help here.
    	x := strings.Repeat("bbbb", 20) + "c"
    	re := MustCompile("[ac]")
    	b.StartTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
Back to top