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

Introduce StringContinuation data structure #7242

Closed
wants to merge 1 commit into from

Conversation

MichaReiser
Copy link
Member

Summary

Similar to the preceding PR. It extracts a StringContinuation data structure that allows inspection.
Being able to access the continuation parts quickly is important to implement Black's string preview style where we need create three different variations for each implicit concatenated string.

Test Plan

cargo test

@MichaReiser MichaReiser marked this pull request as draft September 8, 2023 10:44
Base automatically changed from extract-string-part to main September 8, 2023 10:56
@codspeed-hq
Copy link

codspeed-hq bot commented Sep 21, 2023

CodSpeed Performance Report

Merging #7242 will degrade performances by 5.44%

Comparing create-string-continuation (272306b) with main (0a07a2c)

Summary

⚡ 6 improvements
❌ 5 regressions
✅ 14 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main create-string-continuation Change
formatter[pydantic/types.py] 19.9 ms 19.1 ms +4.27%
linter/all-rules[numpy/globals.py] 4 ms 4.1 ms -2.77%
formatter[large/dataset.py] 57.7 ms 52.3 ms +10.29%
linter/all-rules[unicode/pypinyin.py] 15.4 ms 15.7 ms -2.22%
formatter[unicode/pypinyin.py] 3.6 ms 3.4 ms +7.85%
formatter[numpy/ctypeslib.py] 10.9 ms 9.9 ms +9.29%
linter/all-rules[pydantic/types.py] 70 ms 72.9 ms -4.04%
lexer[large/dataset.py] 10.1 ms 9.8 ms +3.25%
linter/all-rules[numpy/ctypeslib.py] 33.2 ms 34.2 ms -3.01%
formatter[numpy/globals.py] 1.1 ms 1.1 ms +2.35%
linter/all-rules[large/dataset.py] 155.1 ms 164 ms -5.44%

@MichaReiser MichaReiser deleted the create-string-continuation branch January 16, 2024 10:04
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

1 participant