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
Performance Issue on a Nested JSON example #15
Comments
soasme
added a commit
that referenced
this issue
Feb 16, 2021
This should improve the issue #15 more or less. The execution time was reduced from 0.16s to 0.09s. # time ./a.out real 0m0.090s user 0m0.084s sys 0m0.003s
This was referenced Feb 16, 2021
soasme
added a commit
that referenced
this issue
Feb 17, 2021
Inside the stack frame, the silent and space states are also cached so we don't need the heavy lift of using NeedSquash & NeedLoosen. The performance optimization is significant: Running #15 against the current HEAD (10x faster than #15): ```c time ./a.out real 0m0.014s user 0m0.006s sys 0m0.004s ``` See callgrind output: https://gist.github.com/soasme/f31ea5f78420304a1b12b434a4a808e9
The performance of Current HEAD is 10x faster than v1.2.0:
The result shows the performance has been improved significantly. Close the issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PeppaPEG version: 1.2.0.
Given program, half of the execution time spent on NeedLoosen. We should optimize it.
Run it with valgrind:
$ gcc -g peppapeg.c examples/json.c && valgrind --tool=callgrind ./a.out $ callgrind_annotate callgrind.out.63642
We have below profiling result:
A full profiling result can be seen here: https://gist.github.com/soasme/38471063511aa14302e5ccad173767de
The text was updated successfully, but these errors were encountered: