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

avoid conversion from Char to String to Symbol in some LinearAlgebra routines #29352

Merged
merged 1 commit into from
Sep 25, 2018

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Sep 24, 2018

This round-tripping between symbols and chars everywhere feels non-ideal but anyway.

Benchmark

using LinearAlgebra
using BenchmarkTools
a = Symmetric(rand(10,10));
@btime $(a)[1,1]

Before PR:

  105.620 ns (1 allocation: 32 bytes)

After PR

  2.688 ns (0 allocations: 0 bytes)

@KristofferC
Copy link
Member Author

This regressed vs 0.6, seems introduced in #25688

@KristofferC KristofferC added performance Must go faster linear algebra Linear algebra labels Sep 24, 2018
Copy link
Member

@Sacha0 Sacha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps regrettable in terms of readability, but otherwise lgtm! :)

@fredrikekre fredrikekre merged commit 993e7d7 into master Sep 25, 2018
@fredrikekre fredrikekre deleted the kc/perf_sym branch September 25, 2018 06:36
@fredrikekre
Copy link
Member

backport?

@KristofferC
Copy link
Member Author

This regression. Is pretty bad so I think for 1.0.2 it would be good to have.

@oscardssmith
Copy link
Member

Wait, why are strings is Chars involved here?

@KristofferC
Copy link
Member Author

@edit Symbol('U')

KristofferC added a commit that referenced this pull request Sep 30, 2018
KristofferC added a commit that referenced this pull request Feb 11, 2019
KristofferC added a commit that referenced this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants