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

special-case linear algebra operations for small matrices #181

Closed
JeffBezanson opened this issue Aug 17, 2011 · 7 comments
Closed

special-case linear algebra operations for small matrices #181

JeffBezanson opened this issue Aug 17, 2011 · 7 comments
Assignees
Labels
performance Must go faster

Comments

@JeffBezanson
Copy link
Member

We now know inline code is faster than BLAS for 2x2 at least.
Probably also helps for matrix*vector and backslash.

@ghost ghost assigned ViralBShah Aug 17, 2011
@ViralBShah
Copy link
Member

Addressed in commit cced0a3. We probably need to reorganize the matrix multiplication code to allow multiple cases and dispatching to various different versions.

@ViralBShah
Copy link
Member

I feel that the way to do this would be through a simple codegen, like in some of the N-d stuff, which generates the correct loops.

@StefanKarpinski
Copy link
Member

Should we perhaps have small matrix classes so that we can more easily write specialized code for them?

@ViralBShah
Copy link
Member

A small matrix class could be useful. But, first, we need to come up with a list of functions that we want to work fast on small matrices. Then, we need to see if it is possible to beat the library functions, and have a general method that works for small matrices, and not just 2x2 and 3x3.

In any case, you still have to put the size check in the routines, unless the small matrices are created with special constructors.

@JeffBezanson
Copy link
Member Author

No, I'm pretty sure a small matrix type would be annoying. Size checks are extremely cheap, and the only reasonable way to implement this.

@StefanKarpinski
Copy link
Member

I agree with present Jeff and disagree with past Stefan.

@ViralBShah
Copy link
Member

Closing this one since there isn't anything really to do here now. We can reopen if somebody needs some specific small matrix operations.

StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
Implement at-compat for new style call overloading
cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
* Update config.json

* Add files via upload

* Rename exercises/example.jl to exercises/reverse-string/example.jl

* Rename exercises/runtests.jl to exercises/reverse-string/runtests.jl

* Add files via upload

* Create README.md

* Add files via upload

* Delete description.md

* Update README.md

* Update config.json

* Update exercises/reverse-string/runtests.jl

* Update exercises/reverse-string/runtests.jl

* Update reverse-string.jl

* Update runtests.jl

* Update example.jl

* Delete README.md

* Add files via upload

* Update example.jl

* Format config.json & generate notebook
KristofferC pushed a commit that referenced this issue Feb 14, 2025
Stdlib: Statistics
URL: https://github.com/JuliaStats/Statistics.jl.git
Stdlib branch: master
Julia branch: master
Old commit: d49c2bf
New commit: 77bd570
Julia version: 1.13.0-DEV
Statistics version: 1.11.2(Does not match)
Bump invoked by: @nalimilan
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaStats/Statistics.jl@d49c2bf...77bd570

```
$ git log --oneline d49c2bf..77bd570
77bd570 Fix `quantile` doctest (#188)
bfa5c6b Merge pull request #184 from JuliaStats/an/quantilemuladd
6bd1531 Update src/Statistics.jl
44d51c7 Use muladd in aleph calculation in _quantile to avoid some rounding errors.
793733e Bump codecov/codecov-action from 4 to 5 (#181)
```

Co-authored-by: nalimilan <1120448+nalimilan@users.noreply.github.com>
KristofferC pushed a commit that referenced this issue Feb 14, 2025
Stdlib: Statistics
URL: https://github.com/JuliaStats/Statistics.jl.git
Stdlib branch: master
Julia branch: master
Old commit: d49c2bf
New commit: 77bd570
Julia version: 1.13.0-DEV
Statistics version: 1.11.2(Does not match)
Bump invoked by: @nalimilan
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaStats/Statistics.jl@d49c2bf...77bd570

```
$ git log --oneline d49c2bf..77bd570
77bd570 Fix `quantile` doctest (#188)
bfa5c6b Merge pull request #184 from JuliaStats/an/quantilemuladd
6bd1531 Update src/Statistics.jl
44d51c7 Use muladd in aleph calculation in _quantile to avoid some rounding errors.
793733e Bump codecov/codecov-action from 4 to 5 (#181)
```

Co-authored-by: nalimilan <1120448+nalimilan@users.noreply.github.com>
(cherry picked from commit 504cbc3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

No branches or pull requests

3 participants