jnthn / grammar-debugger

Grammar::Debugger and Grammer::Tracer Perl 6 modules
36 stars 20 forks source link

make it faster! #10

Open meisl opened 10 years ago

meisl commented 10 years ago

Oh boy, indeed...

Here's some first ideas in which directions to go, possibly:

See also these two comments referring to perf: https://github.com/jnthn/grammar-debugger/issues/4#issuecomment-54732451 and https://github.com/jnthn/grammar-debugger/issues/4#issuecomment-54736097

Then, since we all know that premature optimization is the root of evil: there should be a well-organized system of assessing the actual perf of things. So, in order to do this properly, it's necessary to separate

I'm having in mind a benchmark.pl that'll have markdown-like output to be pasted here. There's already some stuff I have near ready; hope to be able to post examples soon.

meisl commented 10 years ago

Another interesting point is whether more static type information actually helps any optimizer downstream.

However, even if current Rakudo and the VM might or might not know how to use it, it remains to be investigated how to actually provide this information for the wrapping code.

So again, the benefit of providing it for the actual wrapping code should be assessed separately from that of providing it for the other method calls that we introduce (onRegexEnter, onRegexExit, ...)