now try using it

This commit is contained in:
Kistaro Windrider 2024-03-09 22:25:48 -08:00
parent 41d2b32689
commit 33c7241209
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -185,7 +185,11 @@ func main() {
rand.Shuffle(len(items), func(i, j int) { rand.Shuffle(len(items), func(i, j int) {
items[i], items[j] = items[j], items[i] 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...") fmt.Println("Sorted. Saving...")
obuf := bufio.NewWriter(ofile) obuf := bufio.NewWriter(ofile)
for i, s := range sorted { for i, s := range sorted {