1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-12 20:27:30 +08:00

fix: javascript sort time (#459)

Reduce the item count in JavaScript sort benchmarks to something more
reasonable given the memory pressure they cause.

Fixes #378
This commit is contained in:
Steven Hartland 2022-11-27 20:09:54 +00:00 committed by GitHub
parent 3cf1fcc1d8
commit e92282a6bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,16 +43,16 @@ func BenchmarkGoSliceHeapSort100000000(b *testing.B) {
benchmarkGoSliceSort(b, 100000000, "heapSort(testSlice);", jsHeapSort) benchmarkGoSliceSort(b, 100000000, "heapSort(testSlice);", jsHeapSort)
} }
func BenchmarkJsArrayQuickSort10000(b *testing.B) { func BenchmarkJsArrayQuickSort500(b *testing.B) {
benchmarkJsArraySort(b, 10000, "quickSort(testSlice, 0, testSlice.length-1);", jsQuickSort) benchmarkJsArraySort(b, 500, "quickSort(testSlice, 0, testSlice.length-1);", jsQuickSort)
} }
func BenchmarkJsArrayMergeSort10000(b *testing.B) { func BenchmarkJsArrayMergeSort500(b *testing.B) {
benchmarkJsArraySort(b, 10000, "mergeSort(testSlice);", jsMergeSort) benchmarkJsArraySort(b, 500, "mergeSort(testSlice);", jsMergeSort)
} }
func BenchmarkJsArrayHeapSort10000(b *testing.B) { func BenchmarkJsArrayHeapSort500(b *testing.B) {
benchmarkJsArraySort(b, 10000, "heapSort(testSlice);", jsHeapSort) benchmarkJsArraySort(b, 500, "heapSort(testSlice);", jsHeapSort)
} }
func BenchmarkCryptoAES(b *testing.B) { func BenchmarkCryptoAES(b *testing.B) {