From d89e7183c50dc5abc4ed07ef1112de66d4dcbe4f Mon Sep 17 00:00:00 2001 From: John Date: Wed, 28 Mar 2018 10:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84gtype=E6=80=A7=E8=83=BD?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g/container/gtype/README.MD | 20 ++++++++++---------- g/container/gtype/gtype_test.go | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/g/container/gtype/README.MD b/g/container/gtype/README.MD index 729c5f10f..6726192bc 100644 --- a/g/container/gtype/README.MD +++ b/g/container/gtype/README.MD @@ -4,31 +4,31 @@ john@johnstation:~/Workspace/Go/GOPATH/src/gitee.com/johng/gf/g/container/gtype$ goos: linux goarch: amd64 BenchmarkInt_Set-8 300000000 5.65 ns/op -BenchmarkInt_Get-8 2000000000 0.35 ns/op +BenchmarkInt_Val-8 2000000000 0.35 ns/op BenchmarkInt_Add-8 300000000 5.68 ns/op BenchmarkInt32_Set-8 300000000 5.67 ns/op -BenchmarkInt32_Get-8 2000000000 0.36 ns/op +BenchmarkInt32_Val-8 2000000000 0.36 ns/op BenchmarkInt32_Add-8 300000000 5.68 ns/op BenchmarkInt64_Set-8 300000000 5.66 ns/op -BenchmarkInt64_Get-8 2000000000 0.35 ns/op +BenchmarkInt64_Val-8 2000000000 0.35 ns/op BenchmarkInt64_Add-8 300000000 5.67 ns/op BenchmarkUint_Set-8 300000000 5.68 ns/op -BenchmarkUint_Get-8 2000000000 0.34 ns/op +BenchmarkUint_Val-8 2000000000 0.34 ns/op BenchmarkUint_Add-8 300000000 5.68 ns/op BenchmarkUint32_Set-8 300000000 5.65 ns/op -BenchmarkUint32_Get-8 2000000000 0.34 ns/op +BenchmarkUint32_Val-8 2000000000 0.34 ns/op BenchmarkUint32_Add-8 300000000 5.66 ns/op BenchmarkUint64_Set-8 300000000 5.68 ns/op -BenchmarkUint64_Get-8 2000000000 0.34 ns/op +BenchmarkUint64_Val-8 2000000000 0.34 ns/op BenchmarkUint64_Add-8 300000000 5.68 ns/op BenchmarkBool_Set-8 300000000 5.67 ns/op -BenchmarkBool_Get-8 2000000000 0.34 ns/op +BenchmarkBool_Val-8 2000000000 0.34 ns/op BenchmarkString_Set-8 30000000 48.5 ns/op -BenchmarkString_Get-8 100000000 12.3 ns/op +BenchmarkString_Val-8 100000000 12.3 ns/op BenchmarkBytes_Set-8 50000000 34.9 ns/op -BenchmarkBytes_Get-8 100000000 12.5 ns/op +BenchmarkBytes_Val-8 100000000 12.5 ns/op BenchmarkInterface_Set-8 50000000 34.2 ns/op -BenchmarkInterface_Get-8 100000000 12.2 ns/op +BenchmarkInterface_Val-8 100000000 12.2 ns/op PASS ok command-line-arguments 43.447s ``` diff --git a/g/container/gtype/gtype_test.go b/g/container/gtype/gtype_test.go index 60ac15fac..30e88bc36 100644 --- a/g/container/gtype/gtype_test.go +++ b/g/container/gtype/gtype_test.go @@ -32,7 +32,7 @@ func BenchmarkInt_Set(b *testing.B) { } } -func BenchmarkInt_Get(b *testing.B) { +func BenchmarkInt_Val(b *testing.B) { for i := 0; i < b.N; i++ { it.Val() } @@ -50,7 +50,7 @@ func BenchmarkInt32_Set(b *testing.B) { } } -func BenchmarkInt32_Get(b *testing.B) { +func BenchmarkInt32_Val(b *testing.B) { for i := int32(0); i < int32(b.N); i++ { it32.Val() } @@ -68,7 +68,7 @@ func BenchmarkInt64_Set(b *testing.B) { } } -func BenchmarkInt64_Get(b *testing.B) { +func BenchmarkInt64_Val(b *testing.B) { for i := int64(0); i < int64(b.N); i++ { it64.Val() } @@ -88,7 +88,7 @@ func BenchmarkUint_Set(b *testing.B) { } } -func BenchmarkUint_Get(b *testing.B) { +func BenchmarkUint_Val(b *testing.B) { for i := uint(0); i < uint(b.N); i++ { uit.Val() } @@ -108,7 +108,7 @@ func BenchmarkUint32_Set(b *testing.B) { } } -func BenchmarkUint32_Get(b *testing.B) { +func BenchmarkUint32_Val(b *testing.B) { for i := uint32(0); i < uint32(b.N); i++ { uit32.Val() } @@ -127,7 +127,7 @@ func BenchmarkUint64_Set(b *testing.B) { } } -func BenchmarkUint64_Get(b *testing.B) { +func BenchmarkUint64_Val(b *testing.B) { for i := uint64(0); i < uint64(b.N); i++ { uit64.Val() } @@ -147,7 +147,7 @@ func BenchmarkBool_Set(b *testing.B) { } } -func BenchmarkBool_Get(b *testing.B) { +func BenchmarkBool_Val(b *testing.B) { for i := 0; i < b.N; i++ { bl.Val() } @@ -161,7 +161,7 @@ func BenchmarkString_Set(b *testing.B) { } } -func BenchmarkString_Get(b *testing.B) { +func BenchmarkString_Val(b *testing.B) { for i := 0; i < b.N; i++ { str.Val() } @@ -175,7 +175,7 @@ func BenchmarkBytes_Set(b *testing.B) { } } -func BenchmarkBytes_Get(b *testing.B) { +func BenchmarkBytes_Val(b *testing.B) { for i := 0; i < b.N; i++ { bytes.Val() } @@ -188,7 +188,7 @@ func BenchmarkInterface_Set(b *testing.B) { } } -func BenchmarkInterface_Get(b *testing.B) { +func BenchmarkInterface_Val(b *testing.B) { for i := 0; i < b.N; i++ { inf.Val() }