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

inline arithmetic between chars and Integers #32681

Merged
merged 1 commit into from
Aug 26, 2019
Merged

Conversation

KristofferC
Copy link
Sponsor Member

Arithmetic between Chars and Integers is often used in quite tight parts of parsing and other string / char manipulations.

As an example

Before

julia> @btime uppercase($(Ref('a'))[])
  5.332 ns (0 allocations: 0 bytes)
'A': ASCII/Unicode U+0041 (category Lu: Letter, uppercase)

After

julia> @btime uppercase($(Ref('a'))[])  
  3.858 ns (0 allocations: 0 bytes)
'A': ASCII/Unicode U+0041 (category Lu: Letter, uppercase)

@KristofferC KristofferC added performance Must go faster domain:strings "Strings!" labels Jul 25, 2019
@KristofferC KristofferC merged commit 2af5c86 into master Aug 26, 2019
@delete-merged-branch delete-merged-branch bot deleted the kc/inline_arith branch August 26, 2019 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:strings "Strings!" performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants