jjzjj

sortingFunctions

全部标签

去超时不开火

为了好玩,我在Go中实现了一些排序算法,现在我想测试它们对随机整数的性能。所以我写了下面的程序。我遵循了类似的格式:https://gobyexample.com/timeouts但是,似乎超时未正确触发。下面是我的代码:packagemainimport("allanpinkerton.com/algorithms/sorting""fmt""math/rand""os""strconv""time")//PrintsoutthetimeelapsedsincestartfunctimeExecution(startTimetime.Time,functionNamestring,i