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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yuto Ono
May 22, 2023
1.1k
0
Share
WebAssembly で 世界最速の数独ソルバーを作った話
Yuto Ono
May 22, 2023
More Decks by Yuto Ono
See All by Yuto Ono
1_年間_EM_エンジニアリングマネージャー_を経験した人の話.pdf
yutoono
0
90
EMを目指す方法
yutoono
1
210
Svelte でルービックキューブを作ってみた
yutoono
1
240
レガシーなフロントエンドを_React___Next.js_にリプレースした結果.pdf
yutoono
0
1.3k
レガシーなフロントエンドを リプレースするプラクティス。 エネチェンジが挑む 「React化」
yutoono
4
2.1k
AWS Codebuild のすすめ
yutoono
0
1.5k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
Ethics towards AI in product and experience design
skipperchong
2
290
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
How STYLIGHT went responsive
nonsquared
100
6.1k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
350
Believing is Seeing
oripsolob
1
140
Balancing Empowerment & Direction
lara
6
1.1k
What's in a price? How to price your products and services
michaelherold
247
13k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
190
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 株式会社