Skip to content

simple_hash faster by lifting length(str) #553

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

adienes
Copy link
Member

@adienes adienes commented May 13, 2025

avoids github.com/JuliaLang/julia/issues/33712, matches JuliaLang/Tokenize.jl#213

probably rarely makes a difference but might as well; this should be strictly better.

@simeonschaub
Copy link
Member

I don't think using length here is even correct for non-ASCII strings, this code should be using lastindex instead

Co-authored-by: Sebastian Pfitzner <[email protected]>
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.25%. Comparing base (30109d4) to head (542dcd7).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
+ Coverage   96.18%   96.25%   +0.07%     
==========================================
  Files          13       13              
  Lines        4032     4331     +299     
==========================================
+ Hits         3878     4169     +291     
- Misses        154      162       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pfitzseb pfitzseb merged commit d426bda into JuliaLang:main May 14, 2025
37 checks passed
@adienes adienes deleted the length_string_trap branch May 16, 2025 14:34
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.

3 participants