Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebAssembly で 世界最速の数独ソルバーを作った話
Search
Yuto Ono
May 22, 2023
0
1.1k
WebAssembly で 世界最速の数独ソルバーを作った話
Yuto Ono
May 22, 2023
Tweet
Share
More Decks by Yuto Ono
See All by Yuto Ono
1_年間_EM_エンジニアリングマネージャー_を経験した人の話.pdf
yutoono
0
73
EMを目指す方法
yutoono
1
180
Svelte でルービックキューブを作ってみた
yutoono
1
230
レガシーなフロントエンドを_React___Next.js_にリプレースした結果.pdf
yutoono
0
1.2k
レガシーなフロントエンドを リプレースするプラクティス。 エネチェンジが挑む 「React化」
yutoono
4
2.1k
AWS Codebuild のすすめ
yutoono
0
1.4k
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
390
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
Making the Leap to Tech Lead
cromwellryan
135
9.7k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
0
390
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
A Soul's Torment
seathinner
1
2.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
84
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
180
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
180
Transcript
WebAssembly で 世界最速の数独ソルバーを作った話 by Yuto
Yuto の自己紹介 • 1995年生まれ(28歳) • ENECHANGE株式会社 • フロントエンドエンジニア • TypeScript,
React, Next.js • 趣味で Svelte, Solid, Rust, WebAssembly など • Deno 気になる
最近、WebAssembly (Wasm) 流行っていますね • Amazon Prime Videoが動画再生にWebAssemblyを採用 • Figma is
powered by WebAssembly • WebAssembly対応でRubyは何が出来るようになったのか?
僕も WebAssembly 触ってみたい
でも、普通にTutorialやるだけじゃ つまんないな
そうだ、数独を普通のJSとWasmで実装して比 較してみよう
JavaScript (TypeScript) での実装 数独を一瞬で解いてしまうプログラム 平均 6.1ms
Rust + Wasm での実装 数独を一瞬で解いてしまうプログラム(Rust版) 平均 2.2ms!! 圧勝! JSよりも3.9ms速いという結果に
ちなみに せっかくなのでロジック部分をnpmで公開しちゃいましたw https://www.npmjs.com/package/sudoku-solver-ts
まとめ 詳しいことはこちらの記事に書いたので興味のある方は読んでください Rust + WebAssembly で、世界最速の数独ソルバーを作った話 [bitboard] - Qiita WebAssembly
は、今のところ、パフォーマンス最適化の目的で Rust や C++ などの高 速な言語が選ばれているが、今後、好きな言語でフロントエンド開発できるという用途で も使われるようになるかも? Rubyでフロントエンドを書くという時代がやってくるかも!
PR ENECHANGEではエネルギー問題に興味のある エンジニアを絶賛募集しています! ENECHANGE(エネチェンジ) エンジニア採用サイト 社会の動きと連動しながら、サービスを改善し続ける。「エネ チェンジ」の開発にはそんな面白さがある | ENECHANGE 株式会社