sharksforarms / deku

Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.14k stars 55 forks source link

Is deku fast? #288

Closed vext01 closed 2 years ago

vext01 commented 2 years ago

Hi,

Do we have any idea if deku generates fast parsers?

Cheers

wcampbell0x2a commented 2 years ago

I have done some work recently to improve the speed of the deku generated parsers.

We don't have benchmarks against just writing a parser by hand. My only note is that if you are only using this to parse bytes then your performance will suffer quite a bit, as our backend bitvec works on bit slices.

See #25

sharksforarms commented 2 years ago

There are some trade-offs, yes. Not to say these couldn't be solved given some effort / time. I would recommend doing comparisons/benchmarks yourself and see if it meets your requirements.

Fast is relative.