基准测试结果如下:

    1. john@john-B85M:~/Workspace/Go/GOPATH/src/github.com/gogf/gf/v2/container/gtype$ go test -bench=".*" -benchmem
    2. goos: linux
    3. goarch: amd64
    4. pkg: github.com/gogf/gf/v2/container/gtype
    5. BenchmarkInt_Set-4 300000000 5.87 ns/op 0 B/op 0 allocs/op
    6. BenchmarkInt_Val-4 2000000000 0.46 ns/op 0 B/op 0 allocs/op
    7. BenchmarkInt_Add-4 300000000 5.86 ns/op 0 B/op 0 allocs/op
    8. BenchmarkInt32_Set-4 300000000 5.87 ns/op 0 B/op 0 allocs/op
    9. BenchmarkInt32_Val-4 2000000000 0.47 ns/op 0 B/op 0 allocs/op
    10. BenchmarkInt32_Add-4 300000000 5.85 ns/op 0 B/op 0 allocs/op
    11. BenchmarkInt64_Set-4 300000000 5.88 ns/op 0 B/op 0 allocs/op
    12. BenchmarkInt64_Val-4 2000000000 0.46 ns/op 0 B/op 0 allocs/op
    13. BenchmarkInt64_Add-4 300000000 5.88 ns/op 0 B/op 0 allocs/op
    14. BenchmarkUint_Set-4 300000000 5.88 ns/op 0 B/op 0 allocs/op
    15. BenchmarkUint_Val-4 2000000000 0.46 ns/op 0 B/op 0 allocs/op
    16. BenchmarkUint_Add-4 300000000 5.87 ns/op 0 B/op 0 allocs/op
    17. BenchmarkUint32_Set-4 300000000 5.86 ns/op 0 B/op 0 allocs/op
    18. BenchmarkUint32_Val-4 2000000000 0.50 ns/op 0 B/op 0 allocs/op
    19. BenchmarkUint32_Add-4 200000000 5.86 ns/op 0 B/op 0 allocs/op
    20. BenchmarkUint64_Set-4 300000000 5.86 ns/op 0 B/op 0 allocs/op
    21. BenchmarkUint64_Val-4 2000000000 0.47 ns/op 0 B/op 0 allocs/op
    22. BenchmarkUint64_Add-4 300000000 5.85 ns/op 0 B/op 0 allocs/op
    23. BenchmarkBool_Set-4 300000000 5.85 ns/op 0 B/op 0 allocs/op
    24. BenchmarkBool_Val-4 2000000000 0.46 ns/op 0 B/op 0 allocs/op
    25. BenchmarkString_Set-4 20000000 90.1 ns/op 23 B/op 1 allocs/op
    26. BenchmarkString_Val-4 2000000000 1.58 ns/op 0 B/op 0 allocs/op
    27. BenchmarkBytes_Set-4 20000000 76.2 ns/op 35 B/op 2 allocs/op
    28. BenchmarkBytes_Val-4 2000000000 1.58 ns/op 0 B/op 0 allocs/op
    29. BenchmarkInterface_Set-4 50000000 30.7 ns/op 8 B/op 0 allocs/op
    30. BenchmarkInterface_Val-4 2000000000 0.74 ns/op 0 B/op 0 allocs/op
    31. BenchmarkAtomicValue_Store-4 50000000 27.3 ns/op 8 B/op 0 allocs/op
    32. BenchmarkAtomicValue_Load-4 2000000000 0.73 ns/op 0 B/op 0 allocs/op
    33. PASS
    34. ok github.com/gogf/gf/v2/container/gtype 49.454s