-
Notifications
You must be signed in to change notification settings - Fork 49
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
perfomance regression from 6.0.2
to main
#186
Comments
Measurements were obtained using the following PowerShell script: Measure-Command { .\parser.exe | Out-Default } |
Thank you for highlighting. Can you provide the commit hash from the main branch that you used for testing? There were many changes that could affect performance, and some more recent ones I believe could improve performance again. What are you measuring when collecting the benchmark? Could you provide a minimally reproducible example? |
For benchmarking, I have left only the file reading and parsing functionalities. The file is split into 16 parts and read in parallel in 16 isolates through a separator. (semicolon in our case) The parser, built from the grammar definition, always returns one object (meaning that one object is placed in each subchunk between semicolons). There are no delays in reading the file (as it is small, around 400 MB). The main time is spent parsing and tokenizing the output. I can give you access to my experimental private repo with whole code, it looks kinda trashy and unstructured, but only yet |
It may sound strange but looks like that the perfomance was regressed at the 5e944abe55945cab53b045453e835a610aa8d1d4 commit |
Thank you for the clarification. 5e944ab is an interesting find, in my quick tests I found that to improve the speed by around 5% (but I am aware of some older regressions). I will run some of my standard benchmarks now. |
I've updated and run my usual benchmarks on the new development branch: https://docs.google.com/spreadsheets/d/15rRvLnmjT3rhGLP1iEYv5QF1JVMZmPksIjmFysDnnz0/edit?usp=sharing The problem really is that the unicode parsing requires to duplicate each parser that reads individual characters, and I tried to avoid that in some cases. Reintroducing the specialised any-parser to see if that solves at least the regressions in the existing parsers. |
The performance regression in parse-speed seems to happen with 06cfe90. Not clear why, because this change only really changes the way the parsers are instantiated. Maybe it prevents some optimizations? |
Greetings, i'm experiencing performance regression in my code after updating to latest
main
branch from6.0.2
I have measured both versions 20 times each and the results was consistently regressive
There were no changes to the code between them. The only change was to the
petitparser
version in the pubspec file (from^6.0.2
to the gitmain
branch)6.0.2
:main
branch (latest commit):The text was updated successfully, but these errors were encountered: