Oblynx / HierarchicalTemporalMemory.jl

A simple, high-level Julia implementation of Numenta HTM algorithms
https://oblynx.github.io/HierarchicalTemporalMemory.jl
MIT License
21 stars 3 forks source link

Use standard linear algebra for SparseMatrix x BitArray #17

Closed Oblynx closed 5 years ago

Oblynx commented 5 years ago

SparseMatrix x BitArray defaults to dense array multiplication, which is exceedingly slow. I had made custom implementations of these multiplications to work around this, but it's not a good idea to have such low-level, standard operations in custom user code.

Now that I have a fix for upstream issue https://github.com/JuliaLang/julia/issues/32070, I can implement the fix locally and use standard linear algebra, where SparseMatrix * BitArray -> SparseMatrix * Vector(BitArray) (substitute the BitArray with a normal Vector{Bool})