Update readme

This commit is contained in:
s.kamardin 2015-11-30 18:30:08 +03:00
parent 678ba81174
commit 015b706bca
1 changed files with 14 additions and 1 deletions

View File

@ -47,4 +47,17 @@ func main() {
g.Match("at") // false
}
```
```
## Performance
In comparison with [go-glob](https://github.com/ryanuber/go-glob), it is ~2.7x faster (on my personal Mac),
because my glob is compiling patterns for multiple usages. If you will not use compiled `glob.Glob` object,
and do `g := glob.New(pattern); g.Match(...)` every time, then your code will be about ~3x slower.
Run `go test bench=.` from source root to see the benchmarks:
Test | Operations | Speed
-----|------------|------
github.com/gobwas/glob | 20000000 | 165 ns/op
github.com/ryanuber/go-glob | 10000000 | 452 ns/op