Skip to content

seq:reduce memory allocation during prefix search#6949

Merged
cakebaker merged 1 commit intouutils:mainfrom
alexs-sh:feature-seq-reduce-memory-allocation-during-prefix-search
Dec 11, 2024
Merged

seq:reduce memory allocation during prefix search#6949
cakebaker merged 1 commit intouutils:mainfrom
alexs-sh:feature-seq-reduce-memory-allocation-during-prefix-search

Conversation

@alexs-sh
Copy link
Copy Markdown
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.
@github-actions
Copy link
Copy Markdown

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
@cakebaker
Copy link
Copy Markdown
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