diff options
Diffstat (limited to 'perf_test.go')
-rw-r--r-- | perf_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/perf_test.go b/perf_test.go new file mode 100644 index 0000000..d6a0092 --- /dev/null +++ b/perf_test.go @@ -0,0 +1,14 @@ +package goparsify + +import "testing" + +func BenchmarkAny(b *testing.B) { + p := Any("hello", "goodbye", "help") + + for i := 0; i < b.N; i++ { + _, _ = Run(p, "hello") + _, _ = Run(p, "hello world") + _, _ = Run(p, "good boy") + _, _ = Run(p, "help me") + } +} |