1
1
package pure
2
2
============
3
- <img align =" right " src =" https://raw.githubusercontent.com/go-playground/pure/master/logo.png " >![ Project status] ( https://img.shields.io/badge/version-5.2 .0-green.svg )
3
+ <img align =" right " src =" https://raw.githubusercontent.com/go-playground/pure/master/logo.png " >![ Project status] ( https://img.shields.io/badge/version-5.3 .0-green.svg )
4
4
[ ![ Build Status] ( https://travis-ci.org/go-playground/pure.svg?branch=master )] ( https://travis-ci.org/go-playground/pure )
5
5
[ ![ Coverage Status] ( https://coveralls.io/repos/github/go-playground/pure/badge.svg?branch=master )] ( https://coveralls.io/github/go-playground/pure?branch=master )
6
6
[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/go-playground/pure )] ( https://goreportcard.com/report/github.com/go-playground/pure )
@@ -163,7 +163,7 @@ Run on i5-7600 16 GB DDR4-2400 using Go version go1.12.5 darwin/amd64
163
163
NOTICE: pure uses a custom version of [ httprouter] ( https://github.com/julienschmidt/httprouter ) 's radix tree, benchmarks can be found [ here] ( https://github.com/deankarn/go-http-routing-benchmark/tree/pure-and-lars ) the slowdown is with the use of the ` context ` package, as you can see when no SEO params are defined, and therefore no need to store anything in the context, it is faster than even lars.
164
164
165
165
``` go
166
- go test -bench=. -benchmem=true
166
+ go test -bench=. -benchmem=true ./...
167
167
#GithubAPI Routes : 203
168
168
Pure : 37096 Bytes
169
169
@@ -178,35 +178,26 @@ go test -bench=. -benchmem=true
178
178
Pure : 21096 Bytes
179
179
180
180
181
- BenchmarkPure_Param 10000000 184 ns/op 384 B /op 2 allocs/op
182
- BenchmarkPure_Param5 10000000 236 ns/op 384 B /op 2 allocs/op
183
- BenchmarkPure_Param20 5000000 393 ns/op 384 B /op 2 allocs/op
184
- BenchmarkPure_ParamWrite 5000000 240 ns/op 384 B /op 2 allocs/op
185
- BenchmarkPure_GithubStatic 50000000 36.2 ns/op 0 B /op 0 allocs/op
186
- BenchmarkPureGithubParam 10000000 230 ns/op 384 B /op 2 allocs/op
187
- BenchmarkPure_GithubAll 30000 43887 ns/op 64130 B /op 334 allocs/op
188
- BenchmarkPure_GPlusStatic 50000000 22.8 ns/op 0 B /op 0 allocs/op
189
- BenchmarkPure_GPlusParam 10000000 192 ns/op 384 B /op 2 allocs/op
190
- BenchmarkPure_GPlus2Params 10000000 211 ns/op 384 B /op 2 allocs/op
191
- BenchmarkPure_GPlusAll 500000 2457 ns/op 4224 B /op 22 allocs/op
192
- BenchmarkPure_ParseStatic 100000000 23.7 ns/op 0 B /op 0 allocs/op
193
- BenchmarkPure_ParseParam 10000000 177 ns/op 384 B /op 2 allocs/op
194
- BenchmarkPure_Parse2Params 10000000 193 ns/op 384 B /op 2 allocs/op
195
- BenchmarkPure_ParseAll 500000 3751 ns/op 6144 B /op 32 allocs/op
196
- BenchmarkPure_StaticAll 200000 8574 ns/op 0 B /op 0 allocs/op
181
+ goos: darwin
182
+ goarch: arm64
183
+ BenchmarkPure_Param 11965519 100.4 ns/op 256 B /op 1 allocs/op
184
+ BenchmarkPure_Param5 8756385 138.6 ns/op 256 B /op 1 allocs/op
185
+ BenchmarkPure_Param20 4335284 276.5 ns/op 256 B /op 1 allocs/op
186
+ BenchmarkPure_ParamWrite 9980685 120.0 ns/op 256 B /op 1 allocs/op
187
+ BenchmarkPure_GithubStatic 47743062 24.77 ns/op 0 B /op 0 allocs/op
188
+ BenchmarkPure_GithubParam 8514968 139.8 ns/op 256 B /op 1 allocs/op
189
+ BenchmarkPure_GithubAll 42250 28333 ns/op 42753 B /op 167 allocs/op
190
+ BenchmarkPure_GPlusStatic 87363000 13.39 ns/op 0 B /op 0 allocs/op
191
+ BenchmarkPure_GPlusParam 10398274 113.0 ns/op 256 B /op 1 allocs/op
192
+ BenchmarkPure_GPlus2Params 9235220 128.7 ns/op 256 B /op 1 allocs/op
193
+ BenchmarkPure_GPlusAll 792037 1526 ns/op 2816 B /op 11 allocs/op
194
+ BenchmarkPure_ParseStatic 79194198 14.96 ns/op 0 B /op 0 allocs/op
195
+ BenchmarkPure_ParseParam 11391336 104.5 ns/op 256 B /op 1 allocs/op
196
+ BenchmarkPure_Parse2Params 10103078 116.2 ns/op 256 B /op 1 allocs/op
197
+ BenchmarkPure_ParseAll 498306 2417 ns/op 4096 B /op 16 allocs/op
198
+ BenchmarkPure_StaticAll 219930 5225 ns/op 0 B /op 0 allocs/op
197
199
```
198
200
199
- Package Versioning
200
- ----------
201
- I'm jumping on the vendoring bandwagon, you should vendor this package as I will not
202
- be creating different version with gopkg.in like allot of my other libraries.
203
-
204
- Why? because my time is spread pretty thin maintaining all of the libraries I have + LIFE,
205
- it is so freeing not to worry about it and will help me keep pouring out bigger and better
206
- things for you the community.
207
-
208
- I am open versioning with gopkg.in should anyone request it, but this should be stable going forward.
209
-
210
201
Licenses
211
202
--------
212
203
- [ MIT License] ( https://raw.githubusercontent.com/go-playground/pure/master/LICENSE ) (MIT), Copyright (c) 2016 Dean Karn
0 commit comments