func BenchmarkInterspersedStarsEmptyEnd(b *testing.B) {
	// smallLimit specifies the maximum star count of the smaller of two inputs.
	// largeLimit specifies the maximum star count of the larger of two inputs.
	smallLimit, largeLimit := 10, 50
	inputL := make([]string, largeLimit+1, largeLimit+1)
	inputR := make([]string, largeLimit+1, largeLimit+1)

	for i := 1; i <= largeLimit; i++ {
		inputL[i], inputR[i] = interspersedStars(i - 1)
		inputL[i] += "c.*"
		inputR[i] += "d.*"
	}
	for i := 1; i <= largeLimit; i++ {
		for j := 1; j <= largeLimit; j++ {

			if i > smallLimit && j > smallLimit {
				continue
			}

			lhs, rhs := inputL[i], inputR[j]

			b.Run(fmt.Sprintf("with-%d-and-%d-stars", i, j), func(b *testing.B) {
				_, err := NonEmpty(lhs, rhs)
				if err != nil {
					b.Error(err)
				}
			})
		}
	}
}
// BenchmarkInterspersedStarsEmpty1 benchmarks two non-intersecting globs
// such that the mismatch is near the end of both globs, but not at the very end.
// Various combinations of star counts are tried.
BenchmarkInterspersedStarsEmpty1 benchmarks two non-intersecting globs
such that the mismatch is near the end of both globs, but not at the very end.
Various combinations of star counts are tried.
// BenchmarkInterspersedStarsEmpty1 benchmarks two non - intersecting globs // such that the mismatch is near the end of both globs but not at the very end . // Various combinations of star counts are tried .
func BenchmarkInterspersedStarsEmptyEnd(b *testing.B) {
	smallLimit, largeLimit := 10, 50
	inputL := make([]string, largeLimit+1, largeLimit+1)
	inputR := make([]string, largeLimit+1, largeLimit+1)
	for i := 1; i <= largeLimit; i++ {
		inputL[i], inputR[i] = interspersedStars(i - 1)
		inputL[i] += "c.*"
		inputR[i] += "d.*"
	}
	for i := 1; i <= largeLimit; i++ {
		for j := 1; j <= largeLimit; j++ {
			if i > smallLimit && j > smallLimit {
				continue
			}
			lhs, rhs := inputL[i], inputR[j]
			b.Run(fmt.Sprintf("with-%d-and-%d-stars", i, j), func(b *testing.B) {
				_, err := NonEmpty(lhs, rhs)
				if err != nil {
					b.Error(err)
				}
			})
		}
	}
}
func BenchmarkInterspersedStarsEmptyEnd ( b * testing . B ) { smallLimit , largeLimit := 10 , 50 inputL := make ( [ ] string , largeLimit + 1 , largeLimit + 1 ) inputR := make ( [ ] string , largeLimit + 1 , largeLimit + 1 ) for i := 1 ; i <= largeLimit ; i ++ { inputL [ i ] , inputR [ i ] = interspersedStars ( i - 1 ) inputL [ i ] += " " inputR [ i ] += " " } for i := 1 ; i <= largeLimit ; i ++ { for j := 1 ; j <= largeLimit ; j ++ { if i > smallLimit && j > smallLimit { continue } lhs , rhs := inputL [ i ] , inputR [ j ] b . Run ( fmt . Sprintf ( " " , i , j ) , func ( b * testing . B ) { _ , err := NonEmpty ( lhs , rhs ) if err != nil { b . Error ( err ) } } ) } } }
BenchmarkInterspersedStarsEmpty1 benchmarks two non-intersecting globs
such that the mismatch is near the end of both globs, but not at the very end.
BenchmarkInterspersedStarsEmpty1 benchmarks two non - intersecting globs such that the mismatch is near the end of both globs but not at the very end .
// smallLimit specifies the maximum star count of the smaller of two inputs. // largeLimit specifies the maximum star count of the larger of two inputs.