所以我在go中实现了一个快速排序算法。我使用gotest对其进行了测试,效果非常好。现在我想让它并发并检查计算时间的差异。算法如下所示:packagemysortimport("math/rand")//ConcurrentPartition-ConcurrentQuicksortfunctionforpartitioningthearray(randomizedchoiceofapivot)funcConcurrentPartition(A[]int,pint,rint)int{index:=rand.Intn(r-p)+ppivot:=A[index]A[index]=A[r]A[
所以我在go中实现了一个快速排序算法。我使用gotest对其进行了测试,效果非常好。现在我想让它并发并检查计算时间的差异。算法如下所示:packagemysortimport("math/rand")//ConcurrentPartition-ConcurrentQuicksortfunctionforpartitioningthearray(randomizedchoiceofapivot)funcConcurrentPartition(A[]int,pint,rint)int{index:=rand.Intn(r-p)+ppivot:=A[index]A[index]=A[r]A[