Skip to content

seq:reduce memory allocation during prefix search #6949

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

Conversation

alexs-sh
Copy link
Contributor

Hello,

I noticed that the code in the numberparse module tries to work without extra memory allocations. However, one place with to_lowercase breaks the general approach.

So, I slightly updated that part to match the common pattern.

Please feel free just to close the PR if this change seems unimportant or a preliminary optimization.

Thank you

This improvement eliminates extra memory allocations during the search
for 0x/0X prefixes in number strings.
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker merged commit 7025620 into uutils:main Dec 11, 2024
60 of 62 checks passed
@cakebaker
Copy link
Contributor

Thanks!

@alexs-sh alexs-sh deleted the feature-seq-reduce-memory-allocation-during-prefix-search branch December 14, 2024 14:48
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.

2 participants