Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkSortIsSorted (0.71 sec)

  1. src/sort/sort_slices_benchmark_test.go

    	}
    }
    
    func BenchmarkSlicesSortInts(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeRandomInts(N)
    		b.StartTimer()
    		slices.Sort(ints)
    	}
    }
    
    func BenchmarkSortIsSorted(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		b.StopTimer()
    		ints := makeSortedInts(N)
    		b.StartTimer()
    		IsSorted(IntSlice(ints))
    	}
    }
    
    func BenchmarkSlicesIsSorted(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 22:59:40 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top