常用方法的基准性能测试:https://github.com/gogf/gf/v2/blob/master/errors/gerror/gerror_z_bench_test.go

    1. $ go test *.go -bench=".*" -benchmem
    2. goos: linux
    3. goarch: amd64
    4. Benchmark_New-4 1890454 589 ns/op 256 B/op 1 allocs/op
    5. Benchmark_Newf-4 1569258 762 ns/op 324 B/op 3 allocs/op
    6. Benchmark_Wrap-4 2012910 600 ns/op 256 B/op 1 allocs/op
    7. Benchmark_Wrapf-4 1600197 749 ns/op 324 B/op 3 allocs/op
    8. Benchmark_NewSkip-4 2009928 579 ns/op 256 B/op 1 allocs/op
    9. Benchmark_NewSkipf-4 1578370 752 ns/op 324 B/op 3 allocs/op
    10. Benchmark_NewCode-4 2060835 591 ns/op 256 B/op 1 allocs/op
    11. Benchmark_NewCodef-4 1603306 752 ns/op 324 B/op 3 allocs/op
    12. Benchmark_NewCodeSkip-4 2047794 584 ns/op 256 B/op 1 allocs/op
    13. Benchmark_NewCodeSkipf-4 1524495 779 ns/op 324 B/op 3 allocs/op
    14. Benchmark_WrapCode-4 1972147 603 ns/op 256 B/op 1 allocs/op
    15. Benchmark_WrapCodef-4 1651316 735 ns/op 324 B/op 3 allocs/op