From a2db95f76cbd7110fb414e14dcddafaec0525e31 Mon Sep 17 00:00:00 2001 From: godotg Date: Fri, 9 Sep 2022 11:53:16 +0800 Subject: [PATCH] =?UTF-8?q?test[go]:=20go=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocol/src/test/go/benchmark1.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protocol/src/test/go/benchmark1.go b/protocol/src/test/go/benchmark1.go index d5b56eb5..96800cba 100644 --- a/protocol/src/test/go/benchmark1.go +++ b/protocol/src/test/go/benchmark1.go @@ -14,15 +14,15 @@ func main() { func test() { var startTime = time.Now() - var arr = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} const NUM int = 100000000 for i := 0; i < NUM; i++ { + var arr = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} bubbleSort(arr) } fmt.Println(time.Since(startTime).Milliseconds()) } -//排序 +// 排序 func bubbleSort(arr []int) { for j := 0; j < len(arr)-1; j++ { for k := 0; k < len(arr)-1-j; k++ { @@ -67,4 +67,4 @@ public class MainTest { } } } - */ +*/