integrii / flaggy

Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
The Unlicense
858 stars 30 forks source link

Create some benchmarks #17

Closed integrii closed 6 years ago

integrii commented 6 years ago

Pretty great results in this added benchmark for my 2014 MacBook Air

goos: darwin
goarch: amd64
pkg: github.com/integrii/flaggy
BenchmarkSubcommandParse-4          3000        510313 ns/op
PASS

That's just 0.5ms for an entire example command with subcommand and positional. See all the benchmark did in each cycle in the diff.