# Faster matrix product with a specifically structured matrix

**URL:** <https://discourse.julialang.org/t/faster-matrix-product-with-a-specifically-structured-matrix/67355>\
**Category:** Performance\
**Tags:** linearalgebra, sparse\
**Created:** [August 30, 2021, 1:55pm UTC](https://discourse.julialang.org/t/faster-matrix-product-with-a-specifically-structured-matrix/67355 "2021-08-30T13:55:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [August 30, 2021, 1:59pm UTC](https://discourse.julialang.org/t/faster-matrix-product-with-a-specifically-structured-matrix/67355/2 "2021-08-30T13:59:12Z")

</div>

> [@lrnv](#):
>
> I guess that the matrix-vector product could be done more efficiently than what `SparseArrays` does.

Did you notice any particular slowdowns? Do you have an example for your matrix-vector product?

* * *

> [@All the ways to do one-hot encoding](https://discourse.julialang.org/t/all-the-ways-to-do-one-hot-encoding/64807):
>
> There are many ways to do one hot encoding in Julia. I want to list down some ways Method Comment Roll your own It’s not too hard Flux.onehot & Flux.onehotbatch pretty heavy to depend on Flux so normally avoided unless u r using Flux anyway DataConvenience.onehot can be applied directly to dataframes FeatureTransform.OneHotEncoder They syntax for FeatureTransform is still on the verbose side for my liking imo MLJ.OneHotEncoder() I really want to like MLJ but it’s quite heavy and…

(Though I don’t think this is necessarily needed here.)

---

_[View the full topic](https://discourse.julialang.org/t/faster-matrix-product-with-a-specifically-structured-matrix/67355)._
