# Parallel computing with \*

**URL:** <https://discourse.julialang.org/t/parallel-computing-with/92276>\
**Category:** Performance\
**Tags:** question\
**Created:** [December 29, 2022, 3:35pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276 "2022-12-29T15:35:29Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![austin-putz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/austin-putz/32/2583_2.png) [@austin-putz](https://discourse.julialang.org/u/austin-putz)\
**Post date:** [December 29, 2022, 6:24pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/21 "2022-12-29T18:24:37Z")

</div>

Okay thank you very much. I appreciate your help. Not a programmer here, just assumed wrong on this one. Hopefully the docs include this information. I have probably been doing this wrong for some time now. Thanks!

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [December 29, 2022, 7:27pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/22 "2022-12-29T19:27:28Z")

</div>

Does Octavian.jl (or a similar package) not parallelize integer matmuls?

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [December 29, 2022, 7:29pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/23 "2022-12-29T19:29:49Z")

</div>

If you take a closer look at the post i linked, you would see that it is recommended that you copy and paste text instead of images of code. The reason being that it is easy to copy-paste from text (and thereby run and test it), but not from images. You get proper formatting by wrapping the code in triple backticks, as demonstrated in that post.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [December 29, 2022, 7:30pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/24 "2022-12-29T19:30:45Z")

</div>

I tested multiplying two Boolean matrices and it was very slow. I think it just fall back to some naive algorithm.

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [December 29, 2022, 7:44pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/25 "2022-12-29T19:44:31Z")

</div>

[GitHub - MasonProtter/Gaius.jl: Divide and Conquer Linear Algebra](https://github.com/MasonProtter/Gaius.jl) says

> Currently, fast, native matrix-multiplication is only implemented between matrices of types `Matrix{<:Union{Float64, Float32, Int64, Int32, Int16}}`, and `StructArray{Complex}`. Support for other other commonly encountered numeric `struct` types such as `Rational` and `Dual` numbers is planned.

---

<div class="post-metadata">

**Author:** ![austin-putz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/austin-putz/32/2583_2.png) [@austin-putz](https://discourse.julialang.org/u/austin-putz)\
**Post date:** [December 29, 2022, 7:54pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/26 "2022-12-29T19:54:37Z")

</div>

I have not tried Octavian yet… I’ll do that tonight. On your 2nd post, interesting, it was an Int64 type. I just assumed it would work in parallel, but the other guy explained why not. Had no idea. Thanks for this link.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [December 29, 2022, 7:58pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/27 "2022-12-29T19:58:13Z")

</div>

iirc Octavian will do integers. the optimizations are pretty much all the same (except for the lack of fma)

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [December 29, 2022, 9:14pm UTC](https://discourse.julialang.org/t/parallel-computing-with/92276/28 "2022-12-29T21:14:47Z")

</div>

Apparently not (ignore compilation times, doesn’t make a difference for the result):

```julia
julia> using Octavian

julia> A = rand(Int, 10^4, 10^3);

julia> @time A * A';
 36.394812 seconds (2.60 M allocations: 888.709 MiB, 0.43% gc time, 1.63% compilation time)

julia> A = rand(Float64, 10^4, 10^3);

julia> @time A * A';
  2.114822 seconds (2.73 M allocations: 895.197 MiB, 3.93% gc time, 31.80% compilation time)

```

just to be sure:

```julia
julia> A = rand(Int, 5*10^3, 5*10^3);

julia> @time Octavian.matmul(A,A');
  7.988792 seconds (3 allocations: 190.735 MiB, 0.08% gc time)

julia> A = rand(Float64, 5*10^3, 5*10^3);

julia> @time Octavian.matmul(A,A');
  2.022297 seconds (3 allocations: 190.735 MiB, 4.02% gc time)

```

[Previous page](https://discourse.julialang.org/t/parallel-computing-with/92276.md?page=1)
