SlideShare una empresa de Scribd logo
1 de 39
Descargar para leer sin conexión
Is WebAssembly the
killer of JavaScript?
Boyan Mihaylov
@bmihaylov
Codemotion Milan 2015
Birth of JavaScript
@bmihaylov | Codemotion Milan 2015 2
1995
Created by Brendan Eich
in 10 days and released
in Netscape Navigator 2.0
Microsoft hits back
@bmihaylov | Codemotion Milan 2015 4
19961995
Microsoft releases
JScript in IE3
Becoming a standard
@bmihaylov | Codemotion Milan 2015 5
The first edition of
ECMA-262 is released
199719961995
photo: engineering.wix.com
2007-2008199719961995
@bmihaylov | Codemotion Milan 2015 7
The jQuery era
JavaScript goes server-side
@bmihaylov | Codemotion Milan 2015 8
JavaScript conquers the world
@bmihaylov | Codemotion Milan 2015 9
JavaScript
source: github.com
Module counts
@bmihaylov | Codemotion Milan 2015 10
source: www.modulecounts.com
Mobile apps
@bmihaylov | Codemotion Milan 2015 11
JavaScript is everywhere, but…
@bmihaylov | Codemotion Milan 2015 12
We are compiling to JavaScript
@bmihaylov | Codemotion Milan 2015 13
JavaScript
C# (Script#)
Java (GWT)
TypeScript
CoffeeScript
C/C++
@bmihaylov | Codemotion Milan 2015 14
C/C++ emscripten
.js
.js + .html
Node.js
Web Browser
Hello, world
@bmihaylov | Codemotion Milan 2015 15
#include<stdio.h>
int main() {
printf("Welcome to Codemotion");
return 0;
}
function _main() {
var $0 = 0, $vararg_buffer= 0,
label = 0, sp = 0;
sp = STACKTOP;
STACKTOP = STACKTOP + 16|0;
if ((STACKTOP|0) >= (STACK_MAX|0))
abort();
$vararg_buffer = sp; $0 = 0;
(_printf((8|0),($vararg_buffer|0))|0);
STACKTOP = sp;
return 0;
}
1 KB 372 KB
Mozilla and Epic ported Unreal Engine 3 to the Web in 4 days
https://www.youtube.com/watch?v=XsyogXtyU9o
Meet asm.js
Started by Mozilla in 2013
A subset of JavaScript to compile very fast
We know the types, rather than infer them on runtime
Enables ahead-of-time (AOT) compilation
@bmihaylov | Codemotion Milan 2015 17
asm.js examples
@bmihaylov | Codemotion Milan 2015 18
function Circle(stdlib,foreign, heap) {
"use asm";
var pi = +stdlib.Math.PI;
function area(r) {
r = r | 0;
return +(pi * r * r);
}
return { area: area };
}
// create and initialize the heap (64k)
var heap = new ArrayBuffer(0x10000);
init(heap, START, END);
// produce exports object,
// linked to AOT-compiledcode
var circle = Circle(window, null, heap);
// calculatethe area of a circle
circle.area(31);
Performance
@bmihaylov | Codemotion Milan 2015 19
0 2 4 6 8 10 12 14 16 18 20
bullet
zlib
skinning
Firefox Chrome Firefox+asm.js Native
source: http://kripken.github.io/mloc_emscripten_talk/#/28
Issues with asm.js
@bmihaylov | Codemotion Milan 2015` 20
Once VMs optimize for it, the parser becomes the bottleneck
We may want to do some things different than JavaScript allows us
It is backed-up only by Mozilla (so far)
WebAssembly
photo: www.onyxtruth.com
What is WebAssembly?
@bmihaylov | Codemotion Milan 2015 22
Improvement to JavaScript and the browser
A new language
Short name is wasm
Compilation target from other languages
Collaborative effort
@bmihaylov | Codemotion Milan 2015 23
+
many others…
WebAssembly
WebAssembly is not bytecode
@bmihaylov | Codemotion Milan 2015 24
Bytecode is linear and stack-, register-, or SSA-based
WebAssembly is binary representation of an AST
WebAssembly is not versioned
WebAssembly will probably lead to universal VM
Abstract syntax tree
@bmihaylov | Codemotion Milan 2015 25
Text format vs. Binary encoding
View source of a
WebAssembly module
Browser developer tools
(when no source maps exist)
Browsers will NOT parse it
Serialized version of the text
format
The main format used by
browsers
Custom-tailored compression
A possible syntax
@bmihaylov | Codemotion Milan 2015 27
(module
(memory1024 (segment 0 "abcdefghijklmnopqrstuvwxyz"))
(import $print "stdio" "print" (param i32))
(func $good (param $i i32)
(call_import $print (i32.load8_u offset=0(get_local $i))) :: 97 'a'
(call_import $print (i32.load8_u offset=1(get_local $i))) :: 98 'b'
(call_import $print (i32.load8_u offset=2 (get_local $i))) :: 99 'c'
(call_import $print (i32.load8_u offset=25(get_local $i))) :: 122 'z‘
)
(export "good" $good)
(assert_return(invoke "good" (i32.const 0)))
)
How to produce WebAssembly
@bmihaylov | Codemotion Milan 2015 28
Produce binary output programmatically
Write code manually using the textual representation
Compile it from another language
WebAssembly is sandboxed
photo: thenextweb.com
asm.js vs WebAssembly
19
6.3
4.1
3
asm.js WebAssembly
Angry Bots demo
MBs
MBs (compressed)
http://beta.unity3d.com/jonas/AngryBots/
WebAssembly today
@bmihaylov | Codemotion Milan 2015 31
Use emscripten to produce it
Stay as close as possible to asm.js
Uses a polyfill to run in the browser
Is in a prototype phase
JavaScript will survive
photo: deviantart.net
WebAssembly is a new feature
@bmihaylov | Codemotion Milan 2015 33
WebAssembly JavaScript
Bytecode
Machine code
WebAssembly and JavaScript
@bmihaylov | Codemotion Milan 2015 34
WebAssembly JavaScript
Games,
video & image
decoders, etc.
External libraries
(f.x., C/C++)
The future of WebAssembly
@bmihaylov | Codemotion Milan 2015 35
Focus on compilation from C/C++
Debug WebAssembly via the source code used to produce it
Mainly low-level computations
Single Instruction, Multiple Data (SIMD)
@bmihaylov | Codemotion Milan 2015 36
WebAssembly fills in the gaps that would
be awkward to fill with JavaScript.
Eric Elliott
“
”
photo: www.adafruit.com
@bmihaylov | Codemotion Milan 2015 37
We think Swift should be everywhere and
used by everyone.
Craig Federighi
Apple’sWWDC 2015
“
”
@bmihaylov | Codemotion Milan 2015 38
39
Grazie, Milano!
hey@boyan.in
@bmihaylov
After party
@bmihaylov | Codemotion Milan 2015

Más contenido relacionado

La actualidad más candente

.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#Bertrand Le Roy
 
Kubernetes on AWS at Europe's Leading Online Fashion Platform
Kubernetes on AWS at Europe's Leading Online Fashion PlatformKubernetes on AWS at Europe's Leading Online Fashion Platform
Kubernetes on AWS at Europe's Leading Online Fashion PlatformHenning Jacobs
 
Concourse ci container based ci for the cloud
Concourse ci   container based ci for the cloudConcourse ci   container based ci for the cloud
Concourse ci container based ci for the cloudJohannes Rudolph
 
Web 2 . .3 Development Services
Web 2 . .3 Development ServicesWeb 2 . .3 Development Services
Web 2 . .3 Development ServicesTheawaster485
 
Android kotlin coroutines
Android kotlin coroutinesAndroid kotlin coroutines
Android kotlin coroutinesBipin Vayalu
 
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...Building on spring boot lastminute.com microservices way (Spring IO Barcelona...
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...Michele Orsi
 

La actualidad más candente (11)

.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
What is Platform Dependency?
What is Platform Dependency?What is Platform Dependency?
What is Platform Dependency?
 
Kubernetes on AWS at Europe's Leading Online Fashion Platform
Kubernetes on AWS at Europe's Leading Online Fashion PlatformKubernetes on AWS at Europe's Leading Online Fashion Platform
Kubernetes on AWS at Europe's Leading Online Fashion Platform
 
Concourse ci container based ci for the cloud
Concourse ci   container based ci for the cloudConcourse ci   container based ci for the cloud
Concourse ci container based ci for the cloud
 
Web 2 . .3 Development Services
Web 2 . .3 Development ServicesWeb 2 . .3 Development Services
Web 2 . .3 Development Services
 
Web MIDI API update
Web MIDI API updateWeb MIDI API update
Web MIDI API update
 
Annotated imports
Annotated importsAnnotated imports
Annotated imports
 
Web Assembly
Web AssemblyWeb Assembly
Web Assembly
 
Android kotlin coroutines
Android kotlin coroutinesAndroid kotlin coroutines
Android kotlin coroutines
 
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...Building on spring boot lastminute.com microservices way (Spring IO Barcelona...
Building on spring boot lastminute.com microservices way (Spring IO Barcelona...
 
C9 and jwt
C9 and jwtC9 and jwt
C9 and jwt
 

Similar a Boyan Mihaylov - Is web assembly the killer of javascript

Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerC4Media
 
Unbundling the JavaScript module bundler - Codemotion Rome 2018
Unbundling the JavaScript module bundler - Codemotion Rome 2018Unbundling the JavaScript module bundler - Codemotion Rome 2018
Unbundling the JavaScript module bundler - Codemotion Rome 2018Luciano Mammino
 
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...Codemotion
 
JavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureJavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureIgalia
 
Objective-Cひとめぐり
Objective-CひとめぐりObjective-Cひとめぐり
Objective-CひとめぐりKenji Kinukawa
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVMJohn Lee
 
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...Wey Wey Web
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14Matthieu Garrigues
 
How WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularHow WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularBoyan Mihaylov
 
The Ring programming language version 1.5.1 book - Part 46 of 180
The Ring programming language version 1.5.1 book - Part 46 of 180The Ring programming language version 1.5.1 book - Part 46 of 180
The Ring programming language version 1.5.1 book - Part 46 of 180Mahmoud Samir Fayed
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)Domenic Denicola
 
Browser exploitation SEC-T 2019 stockholm
Browser exploitation SEC-T 2019 stockholmBrowser exploitation SEC-T 2019 stockholm
Browser exploitation SEC-T 2019 stockholmJameel Nabbo
 
Qt Multiplatform development
Qt Multiplatform developmentQt Multiplatform development
Qt Multiplatform developmentSergio Shevchenko
 
Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...Luciano Mammino
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsFastly
 
2020 03-26 - meet up - zparkio
2020 03-26 - meet up - zparkio2020 03-26 - meet up - zparkio
2020 03-26 - meet up - zparkioLeo Benkel
 
Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010Chris Ramsdale
 

Similar a Boyan Mihaylov - Is web assembly the killer of javascript (20)

Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
Unbundling the JavaScript module bundler - Codemotion Rome 2018
Unbundling the JavaScript module bundler - Codemotion Rome 2018Unbundling the JavaScript module bundler - Codemotion Rome 2018
Unbundling the JavaScript module bundler - Codemotion Rome 2018
 
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...
Unbundling the JavaScript module bundler - Luciano Mammino - Codemotion Rome ...
 
JavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and FutureJavaScript Modules Past, Present and Future
JavaScript Modules Past, Present and Future
 
Objective-Cひとめぐり
Objective-CひとめぐりObjective-Cひとめぐり
Objective-Cひとめぐり
 
MacRuby, an introduction
MacRuby, an introductionMacRuby, an introduction
MacRuby, an introduction
 
Android RenderScript on LLVM
Android RenderScript on LLVMAndroid RenderScript on LLVM
Android RenderScript on LLVM
 
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
Portable, secure, and lightweight: Wasm runtimes and their use-cases - Natali...
 
20151224-games
20151224-games20151224-games
20151224-games
 
High performance web programming with C++14
High performance web programming with C++14High performance web programming with C++14
High performance web programming with C++14
 
How WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for AngularHow WebAssembly is changing the Web and what it means for Angular
How WebAssembly is changing the Web and what it means for Angular
 
The Ring programming language version 1.5.1 book - Part 46 of 180
The Ring programming language version 1.5.1 book - Part 46 of 180The Ring programming language version 1.5.1 book - Part 46 of 180
The Ring programming language version 1.5.1 book - Part 46 of 180
 
The State of JavaScript (2015)
The State of JavaScript (2015)The State of JavaScript (2015)
The State of JavaScript (2015)
 
Browser exploitation SEC-T 2019 stockholm
Browser exploitation SEC-T 2019 stockholmBrowser exploitation SEC-T 2019 stockholm
Browser exploitation SEC-T 2019 stockholm
 
Qt Multiplatform development
Qt Multiplatform developmentQt Multiplatform development
Qt Multiplatform development
 
Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...Building a Serverless company with Node.js, React and the Serverless Framewor...
Building a Serverless company with Node.js, React and the Serverless Framewor...
 
Altitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & ApplicationsAltitude San Francisco 2018: WebAssembly Tools & Applications
Altitude San Francisco 2018: WebAssembly Tools & Applications
 
2020 03-26 - meet up - zparkio
2020 03-26 - meet up - zparkio2020 03-26 - meet up - zparkio
2020 03-26 - meet up - zparkio
 
Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010Building Web Apps Sanely - EclipseCon 2010
Building Web Apps Sanely - EclipseCon 2010
 
Novidades do c# 7 e 8
Novidades do c# 7 e 8Novidades do c# 7 e 8
Novidades do c# 7 e 8
 

Más de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Más de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Último

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

Boyan Mihaylov - Is web assembly the killer of javascript

  • 1. Is WebAssembly the killer of JavaScript? Boyan Mihaylov @bmihaylov Codemotion Milan 2015
  • 2. Birth of JavaScript @bmihaylov | Codemotion Milan 2015 2 1995 Created by Brendan Eich in 10 days and released in Netscape Navigator 2.0
  • 3.
  • 4. Microsoft hits back @bmihaylov | Codemotion Milan 2015 4 19961995 Microsoft releases JScript in IE3
  • 5. Becoming a standard @bmihaylov | Codemotion Milan 2015 5 The first edition of ECMA-262 is released 199719961995
  • 7. @bmihaylov | Codemotion Milan 2015 7 The jQuery era
  • 8. JavaScript goes server-side @bmihaylov | Codemotion Milan 2015 8
  • 9. JavaScript conquers the world @bmihaylov | Codemotion Milan 2015 9 JavaScript source: github.com
  • 10. Module counts @bmihaylov | Codemotion Milan 2015 10 source: www.modulecounts.com
  • 11. Mobile apps @bmihaylov | Codemotion Milan 2015 11
  • 12. JavaScript is everywhere, but… @bmihaylov | Codemotion Milan 2015 12
  • 13. We are compiling to JavaScript @bmihaylov | Codemotion Milan 2015 13 JavaScript C# (Script#) Java (GWT) TypeScript CoffeeScript C/C++
  • 14. @bmihaylov | Codemotion Milan 2015 14 C/C++ emscripten .js .js + .html Node.js Web Browser
  • 15. Hello, world @bmihaylov | Codemotion Milan 2015 15 #include<stdio.h> int main() { printf("Welcome to Codemotion"); return 0; } function _main() { var $0 = 0, $vararg_buffer= 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abort(); $vararg_buffer = sp; $0 = 0; (_printf((8|0),($vararg_buffer|0))|0); STACKTOP = sp; return 0; } 1 KB 372 KB
  • 16. Mozilla and Epic ported Unreal Engine 3 to the Web in 4 days https://www.youtube.com/watch?v=XsyogXtyU9o
  • 17. Meet asm.js Started by Mozilla in 2013 A subset of JavaScript to compile very fast We know the types, rather than infer them on runtime Enables ahead-of-time (AOT) compilation @bmihaylov | Codemotion Milan 2015 17
  • 18. asm.js examples @bmihaylov | Codemotion Milan 2015 18 function Circle(stdlib,foreign, heap) { "use asm"; var pi = +stdlib.Math.PI; function area(r) { r = r | 0; return +(pi * r * r); } return { area: area }; } // create and initialize the heap (64k) var heap = new ArrayBuffer(0x10000); init(heap, START, END); // produce exports object, // linked to AOT-compiledcode var circle = Circle(window, null, heap); // calculatethe area of a circle circle.area(31);
  • 19. Performance @bmihaylov | Codemotion Milan 2015 19 0 2 4 6 8 10 12 14 16 18 20 bullet zlib skinning Firefox Chrome Firefox+asm.js Native source: http://kripken.github.io/mloc_emscripten_talk/#/28
  • 20. Issues with asm.js @bmihaylov | Codemotion Milan 2015` 20 Once VMs optimize for it, the parser becomes the bottleneck We may want to do some things different than JavaScript allows us It is backed-up only by Mozilla (so far)
  • 22. What is WebAssembly? @bmihaylov | Codemotion Milan 2015 22 Improvement to JavaScript and the browser A new language Short name is wasm Compilation target from other languages
  • 23. Collaborative effort @bmihaylov | Codemotion Milan 2015 23 + many others… WebAssembly
  • 24. WebAssembly is not bytecode @bmihaylov | Codemotion Milan 2015 24 Bytecode is linear and stack-, register-, or SSA-based WebAssembly is binary representation of an AST WebAssembly is not versioned WebAssembly will probably lead to universal VM
  • 25. Abstract syntax tree @bmihaylov | Codemotion Milan 2015 25
  • 26. Text format vs. Binary encoding View source of a WebAssembly module Browser developer tools (when no source maps exist) Browsers will NOT parse it Serialized version of the text format The main format used by browsers Custom-tailored compression
  • 27. A possible syntax @bmihaylov | Codemotion Milan 2015 27 (module (memory1024 (segment 0 "abcdefghijklmnopqrstuvwxyz")) (import $print "stdio" "print" (param i32)) (func $good (param $i i32) (call_import $print (i32.load8_u offset=0(get_local $i))) :: 97 'a' (call_import $print (i32.load8_u offset=1(get_local $i))) :: 98 'b' (call_import $print (i32.load8_u offset=2 (get_local $i))) :: 99 'c' (call_import $print (i32.load8_u offset=25(get_local $i))) :: 122 'z‘ ) (export "good" $good) (assert_return(invoke "good" (i32.const 0))) )
  • 28. How to produce WebAssembly @bmihaylov | Codemotion Milan 2015 28 Produce binary output programmatically Write code manually using the textual representation Compile it from another language
  • 30. asm.js vs WebAssembly 19 6.3 4.1 3 asm.js WebAssembly Angry Bots demo MBs MBs (compressed) http://beta.unity3d.com/jonas/AngryBots/
  • 31. WebAssembly today @bmihaylov | Codemotion Milan 2015 31 Use emscripten to produce it Stay as close as possible to asm.js Uses a polyfill to run in the browser Is in a prototype phase
  • 33. WebAssembly is a new feature @bmihaylov | Codemotion Milan 2015 33 WebAssembly JavaScript Bytecode Machine code
  • 34. WebAssembly and JavaScript @bmihaylov | Codemotion Milan 2015 34 WebAssembly JavaScript Games, video & image decoders, etc. External libraries (f.x., C/C++)
  • 35. The future of WebAssembly @bmihaylov | Codemotion Milan 2015 35 Focus on compilation from C/C++ Debug WebAssembly via the source code used to produce it Mainly low-level computations Single Instruction, Multiple Data (SIMD)
  • 36. @bmihaylov | Codemotion Milan 2015 36 WebAssembly fills in the gaps that would be awkward to fill with JavaScript. Eric Elliott “ ” photo: www.adafruit.com
  • 37. @bmihaylov | Codemotion Milan 2015 37 We think Swift should be everywhere and used by everyone. Craig Federighi Apple’sWWDC 2015 “ ”
  • 38. @bmihaylov | Codemotion Milan 2015 38