stchang / parsack

A basic Parsec-like monadic parser combinator library implementation in Racket.
MIT License
50 stars 10 forks source link

Feature Specific Profile Support #44

Open LeifAndersen opened 10 years ago

LeifAndersen commented 10 years ago

Parsers using Parsack can now use feature-specific profilers.

Documentation can be found at: http://pkg-build.racket-lang.org/doc/feature-profile/index.html

Use parsack-features in #:extra-features.

stamourv commented 10 years ago

Right, this is using active marks. @LeifAndersen will run some benchmarks to check whether their overhead is a problem in this case. For other features we've worked with, though, active marks have an overhead of at worst 15%. See the appendix of http://www.ccs.neu.edu/racket/pubs/NU-CCIS-14-01.pdf for details.

LeifAndersen commented 10 years ago

So, I have used the benchmark library: https://github.com/stamourv/racket-benchmark to test the effects of continuation marks.

It seems that adding the continuation marks makes the code about 10-15% faster, which seems very odd too me.

I should have time in a week or so to make them passive marks if you want that though. But the active marks don't seem to make much of a difference either way though.