Skip to content

Commit

Permalink
fix: javascript sort time (robertkrimen#459)
Browse files Browse the repository at this point in the history
Reduce the item count in JavaScript sort benchmarks to something more
reasonable given the memory pressure they cause.

Fixes robertkrimen#378
  • Loading branch information
stevenh authored and sg3des committed Jul 17, 2023
1 parent 6c3837b commit 7d23c32
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions functional_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ func BenchmarkGoSliceHeapSort100000000(b *testing.B) {
benchmarkGoSliceSort(b, 100000000, "heapSort(testSlice);", jsHeapSort)
}

func BenchmarkJsArrayQuickSort10000(b *testing.B) {
benchmarkJsArraySort(b, 10000, "quickSort(testSlice, 0, testSlice.length-1);", jsQuickSort)
func BenchmarkJsArrayQuickSort500(b *testing.B) {
benchmarkJsArraySort(b, 500, "quickSort(testSlice, 0, testSlice.length-1);", jsQuickSort)
}

func BenchmarkJsArrayMergeSort10000(b *testing.B) {
benchmarkJsArraySort(b, 10000, "mergeSort(testSlice);", jsMergeSort)
func BenchmarkJsArrayMergeSort500(b *testing.B) {
benchmarkJsArraySort(b, 500, "mergeSort(testSlice);", jsMergeSort)
}

func BenchmarkJsArrayHeapSort10000(b *testing.B) {
benchmarkJsArraySort(b, 10000, "heapSort(testSlice);", jsHeapSort)
func BenchmarkJsArrayHeapSort500(b *testing.B) {
benchmarkJsArraySort(b, 500, "heapSort(testSlice);", jsHeapSort)
}

func BenchmarkCryptoAES(b *testing.B) {
Expand Down

0 comments on commit 7d23c32

Please sign in to comment.