From 33c72412097ce2180473b1022381a8f6a499b5d7 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sat, 9 Mar 2024 22:25:48 -0800 Subject: [PATCH] now try using it --- manualsort.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manualsort.go b/manualsort.go index c750a7a..5d40278 100644 --- a/manualsort.go +++ b/manualsort.go @@ -185,7 +185,11 @@ func main() { rand.Shuffle(len(items), func(i, j int) { items[i], items[j] = items[j], items[i] }) - sorted := mergeSort(items) + qchan := make(chan *Question, len(items)) + go betterLoop(qchan) + sorted := parallelMergeSort(qchan, items) + close(qchan) + fmt.Println("Sorted. Saving...") obuf := bufio.NewWriter(ofile) for i, s := range sorted {