
Rust multi-threading code review
my 3d cellular automata simulation written in rust with multi threading was sub-optimal. Using benchmarks with criterion and the help from my community, I learnt what the bottlenecks of this application are.
Today I share the journey I went through to optimize my multi-threading code!
Let's talk about the code... ;)
original video 3D cellular automata video:
https://youtu.be/63qlEpO73C4
3D Cellular automata project links:
Source code: https://github.com/TanTanDev/3d_celluar_automata
IsseW gpu implementation: https://github.com/IsseW/cas
Dstaatz atomics implementation: https://github.com/dstaatz/3d_celluar_automata/blob/multithread/src/cells_multithreaded_v2.rs
BENCHMARKS I made for this video:
https://github.com/TanTanDev/cellular_automata_video_benchmarks.git
My discord group:
https://discord.gg/9P8QSYf
Want to support me?
Monero: 43Ktj1Bd4Nkaj4fdx6nPvBZkJewcPjxPB9nafnepM7SdGtcU6rhpxyLiV9w3k92rE1UqHTr4BNqe2ScsK1eEENvZDC3W1ur
Credits:
Music Prototype by Wintergatan Build Tracks
Music Valentine by Wintergatan
Music The Rocket by Wintergatan
Music Non-Euclidian Geometry by Punch deck
Music Brazilian Street Fight by Punch deck
Music See The Light by Punch deck
Wintergatan link: https://wintergatan.net/
License can be found on website
Punch deck link: https://soundcloud.com/punch-deck
Punch deck license: https://creativecommons.org/licenses/by/3.0/
#rust #multithreading #review








![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] ๋ชจ๋ฐ์ผ ์ฑ๋ฅ๊ณผ แแ
ณแ
แ
ฉแแ
ณแฏแ
แ
ตแผ](https://img.youtube.com/vi/z0bkXem0g7o/hqdefault.jpg)

![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2D ๊ฒ์์ 3D ์ค๋ธ์ ํธ ์ฝ๊ฒ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ](https://img.youtube.com/vi/8ytJW1I6Agg/hqdefault.jpg)
![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] ๊ทธ๋ฆผ์ ์ต์ ํ๋ก 60FPS](https://img.youtube.com/vi/L494gnEHr5A/hqdefault.jpg)
![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] แแ
ฆแแ
ฉแ
แ
ต แแ
ฅแฏแแ
ฃแจ แแ
ณแแ
ณแ
แ
กแแ
ตแแ
ณ 5แแ
กแแ
ต](https://img.youtube.com/vi/-cxbULpRSXE/hqdefault.jpg)

![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] Sprite Shape vs. Tilemap](https://img.youtube.com/vi/q5Yeif-jJ2I/hqdefault.jpg)
![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2D ๋ฐฐ์นญ ์ต์ ํ](https://img.youtube.com/vi/zMMACezlItM/hqdefault.jpg)


![Cards: Tidy Up! [Demo Out Now]](https://img.youtube.com/vi/6DDIfmMYYFs/hqdefault.jpg)
![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2D ๋ฐฐ์นญ ์กฐ๊ฑด](https://img.youtube.com/vi/5DstF95ojw0/hqdefault.jpg)






![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2๊ฐ์ 2D ๋ฌผ๋ฆฌ ์์คํ
](https://img.youtube.com/vi/eqxd8YjgdEo/hqdefault.jpg)
![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2D ๊ฒ์ ๊ทธ๋ฆผ์ ์ฑ๋ฅ](https://img.youtube.com/vi/yMrlutMnhpc/hqdefault.jpg)

![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] ์ฑ๋ฅ๊ณผ ์ฌ๋ฏธ ์ฌ์ด](https://img.youtube.com/vi/dE1PNUM40ag/hqdefault.jpg)










![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] ๋ฌผ๋ฆฌ๋ฅผ ๋ฐ๊พธ๋ฉด FPS๊ฐ 100๋ฐฐ?](https://img.youtube.com/vi/uUU3wggbNtU/hqdefault.jpg)

![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] 2D แแ
ขแแ
ตแผ](https://img.youtube.com/vi/0HO_7fwC_6A/hqdefault.jpg)
































![[2D ๊ฒ์ ๊ฐ๋ฐ ๊ฟํ ์๋ฆฌ์ฆ] Runtime Sprite Atlas](https://img.youtube.com/vi/ocFwQ4sogDo/hqdefault.jpg)



































































