canopy icon indicating copy to clipboard operation
canopy copied to clipboard

Question about Improving a grammar

Open crashtech opened this issue 3 years ago • 2 comments
trafficstars

Hi there! So I'm really new to grammar and canopy as well. I wrote this PEG file based on several things that I read and the online resources. However, it seems that the final result (I'm using Ruby as the output) is not performing very well. Does anyone know if there is was for me to improve its performance?

https://gist.github.com/crashtech/721a2258335d0d8f7e5a399a58ebc4aa

crashtech avatar May 15 '22 02:05 crashtech

Have a look here https://github.com/jcoglan/canopy/issues/65

mingodad avatar Jun 26 '22 18:06 mingodad

@crashtech I'm not able to comment on the specifics of that grammar. Do you have an example of a benchmark (e.g. using benchmark/ips) to demonstrate the poor performance you're seeing? Have you tried implementing the same grammar in other Ruby PEG toolkits?

The best advice I'm able to give is to analyse your program using ruby-prof to find out where it's spending its time.

jcoglan avatar Jun 27 '22 21:06 jcoglan