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

perf(tools/string): a way faster strip function #14253

Merged
merged 1 commit into from
Feb 14, 2025
Merged

Conversation

bungle
Copy link
Member

@bungle bungle commented Feb 10, 2025

Summary

In #13168 I made this already faster, but this time I managed to make it a way faster, main reason being:

  • not needing to count length of input
  • not needing to use for loop :-)

Leading to potentially better JIT compilation results as well.

The code in my opinion is also easier to read and understand.

I get 3492 ms reduced to (with this PR) 149 ms execution time in microbenchmark.

KAG-6354

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

@github-actions github-actions bot added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Feb 10, 2025
### Summary

In #13168 I made this already faster,
but this time I managed to make it a way faster.

Signed-off-by: Aapo Talvensaari <[email protected]>
@chronolaw
Copy link
Contributor

Do we have some comparison for this?

@bungle
Copy link
Member Author

bungle commented Feb 10, 2025

Do we have some comparison for this?

@chronolaw I updated the description.

@locao locao merged commit 5e7b8b5 into master Feb 14, 2025
50 checks passed
@locao locao deleted the perf/faster-strip branch February 14, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee size/M skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants