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

Add parser benchmark #3990

Merged
merged 1 commit into from
Apr 17, 2023
Merged

Add parser benchmark #3990

merged 1 commit into from
Apr 17, 2023

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Apr 17, 2023

This PR adds a new benchmark that measures the time for parsing, lexing, and a simple AST traversal.

This benchmark is used to get a signal on how changes to the parser or the AST representation affect runtime performance.

@MichaReiser
Copy link
Member Author

MichaReiser commented Apr 17, 2023

@MichaReiser MichaReiser self-assigned this Apr 17, 2023
@MichaReiser MichaReiser added the internal An internal refactor or improvement label Apr 17, 2023
@MichaReiser MichaReiser force-pushed the add-parser-benchmark branch from d14a87e to 7e7fac6 Compare April 17, 2023 06:28
@github-actions
Copy link
Contributor

github-actions bot commented Apr 17, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     17.2±0.08ms     2.4 MB/sec    1.00     17.1±0.07ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.3±0.02ms     3.9 MB/sec    1.00      4.3±0.01ms     3.9 MB/sec
linter/all-rules/numpy/globals.py          1.00    550.4±1.40µs     5.4 MB/sec    1.00    551.2±1.06µs     5.4 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.3±0.03ms     3.5 MB/sec    1.00      7.3±0.03ms     3.5 MB/sec
linter/default-rules/large/dataset.py      1.00      8.6±0.02ms     4.7 MB/sec    1.01      8.6±0.03ms     4.7 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1932.7±1.66µs     8.6 MB/sec    1.01   1949.3±2.38µs     8.5 MB/sec
linter/default-rules/numpy/globals.py      1.00    214.8±0.87µs    13.7 MB/sec    1.00    215.3±2.88µs    13.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.0±0.01ms     6.4 MB/sec    1.00      4.0±0.01ms     6.4 MB/sec
parser/large/dataset.py                                                           1.00      6.9±0.01ms     5.9 MB/sec
parser/numpy/ctypeslib.py                                                         1.00   1372.6±2.81µs    12.1 MB/sec
parser/numpy/globals.py                                                           1.00    136.0±0.33µs    21.7 MB/sec
parser/pydantic/types.py                                                          1.00      3.0±0.00ms     8.5 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     15.9±0.16ms     2.6 MB/sec    1.01     16.1±0.17ms     2.5 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.1±0.09ms     4.1 MB/sec    1.01      4.1±0.05ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    490.1±7.06µs     6.0 MB/sec    1.01    497.3±8.62µs     5.9 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.7±0.07ms     3.8 MB/sec    1.00      6.8±0.06ms     3.8 MB/sec
linter/default-rules/large/dataset.py      1.00      8.0±0.07ms     5.1 MB/sec    1.02      8.2±0.07ms     5.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1759.2±26.72µs     9.5 MB/sec    1.02  1797.1±19.57µs     9.3 MB/sec
linter/default-rules/numpy/globals.py      1.00    190.2±3.00µs    15.5 MB/sec    1.03    196.1±5.34µs    15.0 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.7±0.04ms     7.0 MB/sec    1.03      3.8±0.07ms     6.8 MB/sec
parser/large/dataset.py                                                           1.00      6.5±0.04ms     6.3 MB/sec
parser/numpy/ctypeslib.py                                                         1.00  1232.8±11.82µs    13.5 MB/sec
parser/numpy/globals.py                                                           1.00    124.1±2.47µs    23.8 MB/sec
parser/pydantic/types.py                                                          1.00      2.8±0.05ms     9.2 MB/sec

@MichaReiser MichaReiser marked this pull request as ready for review April 17, 2023 06:56
@MichaReiser MichaReiser merged commit 280dffb into main Apr 17, 2023
@MichaReiser MichaReiser deleted the add-parser-benchmark branch April 17, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants