Commit 4fd16cd
committed
Bypass apply in parser hot loop
When args is empty (the common case for simple grammar rules),
call (func parser) directly instead of (apply func parser args).
This avoids clojure.core/apply -> lang.Apply -> reflect.Value.call
on every grammar rule invocation.1 parent e339b80 commit 4fd16cd
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
166 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
0 commit comments