Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about Improving a grammar #64

Open
crashtech opened this issue May 15, 2022 · 2 comments
Open

Question about Improving a grammar #64

crashtech opened this issue May 15, 2022 · 2 comments

Comments

@crashtech
Copy link

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

@mingodad
Copy link

Have a look here #65

@jcoglan
Copy link
Owner

jcoglan commented Jun 27, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants