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 static assertions to nodes #6228

Merged
merged 2 commits into from
Aug 1, 2023
Merged

Add static assertions to nodes #6228

merged 2 commits into from
Aug 1, 2023

Conversation

MichaReiser
Copy link
Member

Summary

Statically assert the sizes of nodes so that we're mindful about increasing their sizes.

Test Plan

cargo build

@MichaReiser
Copy link
Member Author

MichaReiser commented Aug 1, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@MichaReiser MichaReiser changed the title Add static assertino to nodes Add static assertions to nodes Aug 1, 2023

#[cfg(target_pointer_width = "64")]
mod size_assertions {
#[allow(clippy::wildcard_imports)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not that many imports though

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.01      8.2±0.19ms     4.9 MB/sec    1.00      8.2±0.14ms     5.0 MB/sec
formatter/numpy/ctypeslib.py               1.00  1614.2±22.94µs    10.3 MB/sec    1.02  1645.8±40.03µs    10.1 MB/sec
formatter/numpy/globals.py                 1.01    184.3±7.00µs    16.0 MB/sec    1.00    182.6±5.49µs    16.2 MB/sec
formatter/pydantic/types.py                1.00      3.5±0.10ms     7.2 MB/sec    1.01      3.6±0.11ms     7.2 MB/sec
linter/all-rules/large/dataset.py          1.00     11.0±0.04ms     3.7 MB/sec    1.00     11.0±0.03ms     3.7 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      2.8±0.00ms     6.0 MB/sec    1.01      2.8±0.04ms     5.9 MB/sec
linter/all-rules/numpy/globals.py          1.00    380.8±0.45µs     7.7 MB/sec    1.02    387.3±0.93µs     7.6 MB/sec
linter/all-rules/pydantic/types.py         1.00      4.9±0.02ms     5.2 MB/sec    1.02      5.0±0.12ms     5.1 MB/sec
linter/default-rules/large/dataset.py      1.00      5.7±0.03ms     7.1 MB/sec    1.02      5.9±0.08ms     7.0 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00   1199.6±4.70µs    13.9 MB/sec    1.02  1218.3±12.25µs    13.7 MB/sec
linter/default-rules/numpy/globals.py      1.00    133.8±0.28µs    22.0 MB/sec    1.01    135.7±2.21µs    21.7 MB/sec
linter/default-rules/pydantic/types.py     1.00      2.6±0.04ms    10.0 MB/sec    1.01      2.6±0.03ms     9.9 MB/sec

Windows

group                                      main                                   pr
-----                                      ----                                   --
formatter/large/dataset.py                 1.01     12.3±0.44ms     3.3 MB/sec    1.00     12.2±0.44ms     3.3 MB/sec
formatter/numpy/ctypeslib.py               1.00      2.3±0.09ms     7.1 MB/sec    1.01      2.4±0.13ms     7.1 MB/sec
formatter/numpy/globals.py                 1.01   260.5±18.46µs    11.3 MB/sec    1.00   256.7±16.44µs    11.5 MB/sec
formatter/pydantic/types.py                1.01      5.2±0.17ms     4.9 MB/sec    1.00      5.2±0.27ms     5.0 MB/sec
linter/all-rules/large/dataset.py          1.01     17.0±0.39ms     2.4 MB/sec    1.00     16.8±0.41ms     2.4 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.00      4.4±0.13ms     3.8 MB/sec    1.00      4.4±0.15ms     3.8 MB/sec
linter/all-rules/numpy/globals.py          1.00   541.4±20.04µs     5.5 MB/sec    1.00   540.4±26.40µs     5.5 MB/sec
linter/all-rules/pydantic/types.py         1.00      7.6±0.22ms     3.4 MB/sec    1.00      7.5±0.25ms     3.4 MB/sec
linter/default-rules/large/dataset.py      1.02      9.2±0.29ms     4.4 MB/sec    1.00      9.1±0.31ms     4.5 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.00  1855.6±52.17µs     9.0 MB/sec    1.02  1887.8±99.71µs     8.8 MB/sec
linter/default-rules/numpy/globals.py      1.01   209.2±19.02µs    14.1 MB/sec    1.00   208.0±11.15µs    14.2 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.0±0.13ms     6.4 MB/sec    1.00      4.0±0.12ms     6.4 MB/sec

@MichaReiser MichaReiser merged commit ecfdd8d into main Aug 1, 2023
17 checks passed
@MichaReiser MichaReiser deleted the add-static-assertions branch August 1, 2023 09:54
@MichaReiser MichaReiser mentioned this pull request Aug 1, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants