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
State of WebAssembly
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sendil Kumar N
February 19, 2020
Technology
74
0
Share
State of WebAssembly
Sendil Kumar N
February 19, 2020
More Decks by Sendil Kumar N
See All by Sendil Kumar N
[Heapcon-2023] Building High Performance Web Applications
sendilkumarn
0
110
Building Reactive Microservices with Kotlin & running on Kubernetes
sendilkumarn
0
230
Building Reactive Microservices with JHipster & K8s
sendilkumarn
0
38
Designing High Performance React Applications
sendilkumarn
1
210
Batching, Suspense, and Server Components
sendilkumarn
0
81
DevNexus_Building_with__Zero_Trust_Architecture_Copy.pdf
sendilkumarn
0
92
Lessons Learnt with Visual Testing and Snapshots
sendilkumarn
0
140
Easy Microservices with K8s & Istio
sendilkumarn
0
120
KHipster - Kotlin Hipster
sendilkumarn
0
270
Other Decks in Technology
See All in Technology
Even G2 クイックスタートガイド(日本語版)
vrshinobi1
0
190
Zephyr(RTOS)でOpenPLCを実装してみた
iotengineer22
0
180
Embeddings : Symfony AI en pratique
lyrixx
0
440
「活動」は激変する。「ベース」は変わらない ~ 4つの軸で捉える_AI時代ソフトウェア開発マネジメント
sentokun
0
140
マルチモーダル非構造データとの闘い
shibuiwilliam
1
130
自分をひらくと次のチャレンジの敷居が下がる
sudoakiy
5
1.6k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
トイルを超えたCREは何屋になるのか
bengo4com
0
120
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
650
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
10
77k
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
670
ThetaOS - A Mythical Machine comes Alive
aslander
0
230
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
300
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
64
53k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
170
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to Think Like a Performance Engineer
csswizardry
28
2.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Done Done
chrislema
186
16k
The SEO Collaboration Effect
kristinabergwall1
0
410
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Building Applications with DynamoDB
mza
96
7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Transcript
@sendilkumarn Hoi Nederland !!!
@sendilkumarn Languages are built for a purpose. Choose & Use
them wisely…
The state of WebAssembly Sendil Kumar N
@sendilkumarn Sendil Kumar
@sendilkumarn Hacking on WebAssembly
JavaScript is weird @sendilkumarn
[1, 2] + [3, 4] @sendilkumarn
1, 23, 4 @sendilkumarn [1, 2] + [3, 4]
1, 23, 4 @sendilkumarn [1, 2].toString() + [3, 4].toString() “1,2”
+ “3, 4”
JavaScript is weird* * - sometimes @sendilkumarn
@sendilkumarn JavaScript Execution
@sendilkumarn Load JavaScript
@sendilkumarn a.js AST 1001010010101101010 Execute Profiler Parse Interpret Compile 100101001010
Optimise 1010 GC
@sendilkumarn JavaScript Tuning
@sendilkumarn Css Tuning
JavaScript is awesome @sendilkumarn ~80% ~90% https://2019.stateofjs.com/opinions/
@sendilkumarn JavaScript is easy https://octoverse.github.com/ 6 years in row
@sendilkumarn https://2019.stateofjs.com/opinions/ ~59% ~40% JavaScript is evolving
So what is the problem? @sendilkumarn
@sendilkumarn Types Polymorphism Unpredictable Performance Runtime exceptions
@sendilkumarn Types 66% users interested to use TypeScript https://2019.stateofjs.com/javascript-flavors/
@sendilkumarn Predicatble Performance Types Unpredictable Performance Typed
WebAssembly @sendilkumarn
Yet Another Frontend framework?
@sendilkumarn 00 61 73 6D 01 00 00 00 Native
Code Binary JavaScript Javascript Engine Runtime
@sendilkumarn 00 61 73 6D 01 00 00 00 Native
Code Binary JavaScript Javascript Engine
WebAssembly is not a language @sendilkumarn
@sendilkumarn func add is called Stack get_local $lhs LHS RHS
get_local $rhs i32.add SUM Structured stack machine
@sendilkumarn 00 61 73 6D 01 00 00 00 Size
& Load time efficient
@sendilkumarn What WebAssembly provides?
@sendilkumarn Speed
@sendilkumarn Near Native perf. ~30% faster than JS
@sendilkumarn secure
@sendilkumarn Linear Memory Model
@sendilkumarn Shared Array Buffer
@sendilkumarn Typed
@sendilkumarn i32 i64 f32 f64 00 61 73 6D 01
00 00 00 WebAssembly Binary JavaScript Javascript Engine Binding JS file
@sendilkumarn Boundary Crossing
@sendilkumarn Not always faster
@sendilkumarn How WASM works?
@sendilkumarn WebAssembly Execution
@sendilkumarn Load WebAssembly
@sendilkumarn Decode Compile Execute 00 61 73 6D 00 61
73 6D 00 61 73 6D
@sendilkumarn PARSE COMPILE OPTIMISE EXECUTE GC JavaScript execution DECODE COMPILE
EXECUTE WebAssembly execution
@sendilkumarn PARSE COMPILE OPTIMISE EXECUTE GC JavaScript execution DECODE COMPILE
EXECUTE WebAssembly execution I am faster
@sendilkumarn PARSE COMPILE OPTIMISE EXECUTE GC JavaScript execution DECODE COMPILE
EXECUTE WebAssembly execution Optimised already
@sendilkumarn Streaming compilation
What languages can do wasm? @sendilkumarn
C/C++ @sendilkumarn
@sendilkumarn ./emcc -O3 helloworld.c
Why C/C++? @sendilkumarn Tons of options All batteries included Verbose
Rust @sendilkumarn
@sendilkumarn $ wasm-pack build $ cargo install wasm-pack
Why Rust? @sendilkumarn Inbuilt into the compiler All batteries included
Best tooling support Sometimes bigger binaries
AssemblyScript @sendilkumarn
@sendilkumarn $ asc helloworld.ts -b helloworld.wasm -O3 $ npm i
--save-dev assemblyscript
Why AssemblyScript? @sendilkumarn Closer to JavaScript community Good tooling support
/ options
Go @sendilkumarn
@sendilkumarn $ GOOS=js GOARCH=wasm go build -o out/main.wasm go/main.go
Why Go? @sendilkumarn Easy & Concise TinyGo is awesome Reflections
& Proxies everywhere
@sendilkumarn Future
@sendilkumarn Interface types
@sendilkumarn Single Instruction Multiple Data
@sendilkumarn ♻ Garbage Collection
@sendilkumarn WASI WebAssembly System Interface
JavaScript with WebAssembly together makes web even more awesome &
faster @sendilkumarn
@sendilkumarn Thanks… @sendilkumarn dev.to/sendilkumarn sendilkumarn.com/blog Questions…