# Double checking there is no multi-threaded dense x sparse matmul implementation

**URL:** <https://discourse.julialang.org/t/double-checking-there-is-no-multi-threaded-dense-x-sparse-matmul-implementation/106619>\
**Category:** Performance\
**Tags:** sparse\
**Created:** [November 23, 2023, 9:47am UTC](https://discourse.julialang.org/t/double-checking-there-is-no-multi-threaded-dense-x-sparse-matmul-implementation/106619 "2023-11-23T09:47:50Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![RomeoV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romeov/32/37687_2.png) [@RomeoV](https://discourse.julialang.org/u/RomeoV)\
**Post date:** [November 26, 2023, 1:48am UTC](https://discourse.julialang.org/t/double-checking-there-is-no-multi-threaded-dense-x-sparse-matmul-implementation/106619/6 "2023-11-26T01:48:33Z")

</div>

@ericphanson On the topic of type piracy: As far as I understand, type piracy should be fine in this case, even if other libraries use this function.Quoting [Jeff Bezanos](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913/6):

> Right, type piracy is defining `function f(x::T)` where you “own” neither `f` nor `T`. If `f` is your own function, or `T` is a type you defined, there’s no issue at all. But even if neither is true, it still might be OK. It’s just a smell that something bad might be happening, such as:  
> The author/designer of `f` really did not want it to support type `T`, so you’re misunderstanding what the function is supposed to mean.  
> The code is in the wrong place, and should be moved to where `f` or `T` is defined.  
> But if everything seems to be in order, pirate away.

Of course in this case there might be many other packages using dense x sparse mul, but (let’s imagine for a second this to be true) my implementation is IEEE compliant, and that the threading is fine even e.g. inside of other threading, that I should be fine pirating the `mul!` function. In fact, I believe other packages like `MKLSparse.jl` do the same.

Happy to hear your thoughts, however.

---

_[View the full topic](https://discourse.julialang.org/t/double-checking-there-is-no-multi-threaded-dense-x-sparse-matmul-implementation/106619)._
