This repo tries to assess Rust parsing performance.
crate | parser type | action code | integration | input type | precedence | parameterized rules | streaming input |
---|---|---|---|---|---|---|---|
chumsky | combinators | in source | library | &str , &[u8] , custom |
pratt | Yes | Yes |
combine | combinators | in source | library | &str |
? | ? | ? |
grmtools | CFG | in grammar | library | ? | ? | ? | ? |
lalrpop | LR(1) | in grammar | build script | &str |
none | Yes | No |
lelwel | LL(1) | in grammar | build script | &str |
pratt | Yes | No |
logos | lexer | in source | proc macro | &str , &[u8] |
? | ? | ? |
nom | combinators | in source | library | &str , &[u8] , custom |
pratt | Yes | Yes |
parol | LL(k)/LALR(R) | in grammar | build script | &str |
none | ? | No |
peg | PEG | in grammar | proc macro (block) | &str , &[T] , custom |
climbing | Yes | No |
pest | PEG | external | proc macro (file) | &str |
climbing | No | No |
winnow | combinators | in source | library | &str , &[T] , custom |
none | Yes | Yes |
yap | combinators | in source | library | &str , &[T] , custom |
none | Yes | ? |
Formerly, we compared:
- pom: lack of notoriety
System: Linux 6.8.0-58-generic (x86_64), rustc 1.86.0 (05f9846f8 2025-03-31) w/ -j 8
Note:
- For more "Parse (release)" comparisons, see parser_benchmarks
- Parsers have not been validated and might have differing levels of quality (#5)
$ ./bench.py
$ ./format.py