Maybe: Numpy support #337
Labels
P: maybe
Pending approval of low priority request.
skip-triage
Tells bot to not tag a new issue with 'triage'.
T: enhancement
Enhancement.
I've gone back and forth on this. ColorAide currently doesn't require any dependencies as it is all implemented in pure Python. With that said, it suffers from the performance downside of being pure Python. For many, pure Python is likely more than sufficient, but there may be use cases that would really like better performance.
It would be nice if there was a compatibility layer to allow for speed increase. The problem is that while we can vectorized everything so that abstraction is easier, general vectorization is slower in pure Python than sometimes directly iterating and apply calculations. In Numpy, vectorization is the way to go for optimal speed.
Currently, I use ColorAide in some places where not using Numpy is actually helpful. It is possible we could have two versions, but that also doubles the maintenance burden.
I think abstraction would be difficult as we would sacrifice more performance to gain performance when Numpy is available. I think supporting two variants is probably too much maintenance.
If we were to do this, we would probably just switch over to Numpy in some major release. This would be a huge change. This would require gutting our current matrix support in
algebra
and making ColorAide use Numpy everywhere, vectorizing as much as possible so that we get the performance boosts. This would require us to prototype it and benchmark it.Anyways, I don't know if/when this would happen, but I figure we can keep this open as a possibility. I have heartedly looked into this before, but the only way is to go all in, if we do this.
The text was updated successfully, but these errors were encountered: