@@ -64,26 +64,33 @@ res := e.Evaluate(props)
64
64
65
65
| Benchmark| N| Speed| Used| Allocs|
66
66
| ---------| ----------| -----| ------| ------|
67
- | BenchmarkEqual-8| 1000000000| 7.26 ns/op| 0 B/op| 0 allocs/op|
68
- BenchmarkNotEqual-8|1000000000|4.95 ns/op|0 B/op|0 allocs/op|
69
- BenchmarkLessThan-8|500000000|10.9 ns/op|0 B/op|0 allocs/op|
70
- BenchmarkLessThanEqual-8|1000000000|7.79 ns/op|0 B/op|0 allocs/op|
71
- BenchmarkGreaterThan-8|200000000|18.1 ns/op|0 B/op|0 allocs/op|
72
- BenchmarkGreaterThanEqual-8|300000000|13.9 ns/op|0 B/op|0 allocs/op|
73
- BenchmarkContains-8|50000000|73.0 ns/op|64 B/op|2 allocs/op|
74
- BenchmarkContainsLong50000-8|100000000|55.6 ns/op|32 B/op|1 allocs/op|
75
- BenchmarkNotContains-8|50000000|75.1 ns/op|64 B/op|2 allocs/op|
76
- BenchmarkNotContainsLong50000-8|100000000|56.2 ns/op|32 B/op|1 allocs/op|
77
- BenchmarkOneOf|50000000|70.5 ns/op|64 B/op|2 allocs/op|
78
- BenchmarkNoneOf|100000000|71.7 ns/op|64 B/op|2 allocs/op|
79
- BenchmarkPluckShallow-8|100000000|60.2 ns/op|16 B/op|1 allocs/op|
80
- BenchmarkPluckDeep-8|20000000|242 ns/op|112 B/op|1 allocs/op|
67
+ | BenchmarkEqual-12| 1000000000| 5.22 ns/op| 0 B/op| 0 allocs/op|
68
+ | BenchmarkNotEqual-12| 2000000000| 3.77 ns/op| 0 B/op| 0 allocs/op|
69
+ | BenchmarkLessThan-12| 2000000000| 2.20 ns/op| 0 B/op| 0 allocs/op|
70
+ | BenchmarkLessThanEqual-12| 2000000000| 1.95 ns/op| 0 B/op| 0 allocs/op|
71
+ | BenchmarkGreaterThan-12| 5000000000| 1.95 ns/op| 0 B/op| 0 allocs/op|
72
+ | BenchmarkGreaterThanEqual-12| 2000000000| 1.97 ns/op| 0 B/op| 0 allocs/op|
73
+ | BenchmarkContains-12| 1000000000| 5.66 ns/op| 0 B/op| 0 allocs/op|
74
+ | BenchmarkContainsLong50000-12| 30000| 157679 ns/op| 0 B/op| 0 allocs/op|
75
+ | BenchmarkNotContains-12| 500000000| 11.5 ns/op| 0 B/op| 0 allocs/op|
76
+ | BenchmarkNotContainsLong50000-12| 30000| 157437 ns/op| 0 B/op| 0 allocs/op|
77
+ | BenchmarkOneOf-12| 500000000| 11.0 ns/op| 0 B/op| 0 allocs/op|
78
+ | BenchmarkNoneOf-12| 500000000| 10.7 ns/op| 0 B/op| 0 allocs/op|
79
+ | BenchmarkPluckShallow-12| 100000000| 42.4 ns/op| 16 B/op| 1 allocs/op|
80
+ | BenchmarkPluckDeep-12| 30000000| 174 ns/op| 112 B/op| 1 allocs/op|
81
+ | BenchmarkRule_evaluate-12| 100000000| 51.7 ns/op| 16 B/op| 1 allocs/op|
82
+ | BenchmarkComposite_evaluate-12| 100000000| 58.9 ns/op| 16 B/op| 1 allocs/op|
83
+ | BenchmarkEngine_Evaluate-12| 100000000| 69.9 ns/op| 16 B/op| 1 allocs/op|
81
84
82
85
To run benchmarks:
83
86
```
84
87
go test -run none -bench . -benchtime 3s -benchmem
85
88
```
86
89
90
+ All benchmarks were run on:
91
+
92
+ MacOS High Sierra 2.6Ghz Intel Core i7 16 GB 2400 MHz DDR4
93
+
87
94
# License
88
95
89
96
Copyright © ; 2018 Trevor Hutto
0 commit comments