SlideShare une entreprise Scribd logo
1  sur  128
Télécharger pour lire hors ligne
High Performance JavaScript: JITs in Firefox,[object Object]
Power of the Web,[object Object]
How did we get here?,[object Object],[object Object]
Adding new technologies, like video, audio, integration and 2D+3D drawing,[object Object]
Getting a Webpage,[object Object],www.intel.com,[object Object],192.198.164.158,[object Object]
Getting a Webpage,[object Object],www.intel.com,[object Object],192.198.164.158,[object Object],GET / HTTP/1.0,[object Object],(HTTP Request),[object Object]
Getting a Webpage,[object Object],<html><head><title>Laptop, Notebooks, ...</title></head><script language="javascript">functiondoStuff() {...}</script><body>...,[object Object],(HTML, CSS, JavaScript),[object Object]
Core Web Components,[object Object],[object Object]
CSS provides styling
JavaScript provides a programming interface,[object Object]
Video, Audio tags
WebGL (OpenGL + JavaScript),[object Object]
CSS,[object Object],Cascading Style Sheets,[object Object],Separates presentation from content,[object Object],<b class=”warning”>This is red</b>,[object Object],.warning {color: red;text-decoration: underline;},[object Object]
What is JavaScript?,[object Object],[object Object]
De facto language of the web
Interacts with the DOM and the browser,[object Object]
Displaying a Webpage,[object Object],Layout engine applies CSS to DOM,[object Object],Computes geometry of elements,[object Object],JavaScript engine executes code,[object Object],This can change DOM, triggers “reflow”,[object Object],Finished layout is sent to graphics layer,[object Object]
The Result,[object Object]
JavaScript,[object Object],[object Object]
Initial version written in 10 days
Anything from small browser interactions, complex apps (Gmail) to intense graphics (WebGL),[object Object]
Think LISP or Self, not Java,[object Object],Untyped - no type declarations,[object Object],Multi-Paradigm – objects, closures, first-class functions,[object Object],Highly dynamic - objects are dictionaries,[object Object]
No Type Declarations,[object Object],[object Object],functionf(a) {var x =72.3;if (a)        x = a +"string";return x;},[object Object]
No Type Declarations,[object Object],[object Object],if a is:,[object Object],   number: add;,[object Object],   string: concat;,[object Object],functionf(a) {var x =“hi”;if (a)        x = a +33.2;return x;},[object Object]
Functional,[object Object],[object Object],functionf(a) {returnfunction () {return a;    }}var m = f(5);print(m());,[object Object]
Objects,[object Object],[object Object]
Properties may be deleted or added at any time!var point = { x : 5, y : 10 };deletepoint.x;point.z=12;,[object Object]
Prototypes,[object Object],Every object can have a prototype object,[object Object],If a property is not found on an object, its prototype is searched instead,[object Object],… And the prototype’s prototype, etc..,[object Object]
Numbers,[object Object],[object Object]
Engines use 32-bit integers to optimize
Must preserve semantics: integers overflow to doubles,[object Object]
JavaScript Implementations,[object Object],[object Object]
Garbage collector
Runtime library
Execution engine (VM),[object Object]
Values,[object Object],[object Object]
Unboxed values required for computation,[object Object]
Easy idea: 96-bit struct
32-bits for type
64-bits for double, pointer, or integer
Too big! We have to pack better.,[object Object]
[object Object]
Doubles are normal IEEE-754
How to pack non-doubles?
51 bits of NaN space!IA32, ARM,[object Object],Nunboxing,[object Object]
Nunboxing,[object Object],IA32, ARM,[object Object],Type,[object Object],Payload,[object Object],0x400c0000,[object Object],0x00000000,[object Object],63,[object Object],0,[object Object],[object Object]
Type is double because it’s not a NaN
Encodes: (Double, 3.5),[object Object]
Value is in NaN space
Type is 0xFFFF0001(Int32)
Value is (Int32, 0x00000040),[object Object]
Value is in NaN space
Bits >> 47 == 0x1FFFF == INT32
Bits 47-63 masked off to retrieve payload
Value(Int32, 0x00000040),[object Object]
Garbage Collection,[object Object],Need to reclaim memory without pausing user workflow, animations, etc,[object Object],Need very fast object allocation,[object Object],Consider lots of small objects like points, vectors,[object Object],Reading and writing to the heap must be fast,[object Object]
Mark and Sweep,[object Object],All live objects are found via a recursive traversal of the root value set,[object Object],All dead objects are added to a free list,[object Object],Very slow to traverse entire heap,[object Object],Building free lists can bring “dead” memory into cache,[object Object]
Improvements,[object Object],[object Object]
Marking can be incremental, interleaved with program execution,[object Object]
Generational GC,[object Object],Inactive,[object Object],Active,[object Object],Newborn Space,[object Object],8MB,[object Object],8MB,[object Object],Tenured Space,[object Object]
After Minor GC,[object Object],Active,[object Object],Inactive,[object Object],Newborn Space,[object Object],8MB,[object Object],8MB,[object Object],Tenured Space,[object Object]
Barriers,[object Object],Incremental marking, generational GC need read or write barriers,[object Object],Read barriers are much slower,[object Object],Azul Systems has hardware read barrier,[object Object],Write barrier seems to be well-predicted?,[object Object]
Unknowns,[object Object],How much do cache effects matter?,[object Object],Memory GC has to touch,[object Object],Locality of objects,[object Object],What do we need to consider to make GC fast?,[object Object]
Running JavaScript,[object Object],[object Object]
Basic JIT – Simple, untyped compiler
Advanced JIT – Typed compiler, lightspeed,[object Object]
Giant switch loop
Handles all edge cases of JS semantics,[object Object]
Interpreter,[object Object],case OP_ADD: {        Value lhs = POP();        Value rhs = POP();        Value result;if (lhs.isInt32() && rhs.isInt32()) {int left = rhs.toInt32();int right = rhs.toInt32();if (AddOverflows(left, right, left + right))                result.setInt32(left + right);elseresult.setNumber(double(left) + double(right));        } elseif (lhs.isString() || rhs.isString()) {            String *left = ValueToString(lhs);            String *right = ValueToString(rhs);            String *r = Concatenate(left, right);result.setString(r);        } else {double left = ValueToNumber(lhs);double right = ValueToNumber(rhs);result.setDouble(left + right);        }PUSH(result);break;,[object Object]
Interpreter,[object Object],Very slow!,[object Object],Lots of opcode and type dispatch,[object Object],Lots of interpreter stack traffic,[object Object],Just-in-time compilation solves both,[object Object]
Just In Time,[object Object],Compilation must be very fast,[object Object],Can’t introduce noticeable pauses,[object Object],People care about memory use,[object Object],Can’t JIT everything,[object Object],Can’t create bloated code,[object Object],May have to discard code at any time,[object Object]
Basic JIT,[object Object],JägerMonkey in Firefox 4,[object Object],Every opcode has a hand-coded template of assembly (registers left blank),[object Object],Method at a time:,[object Object],Single pass through bytecode stream!,[object Object],Compiler uses assembly templates corresponding to each opcode,[object Object]
Bytecode,[object Object],GETARG 0 ; fetch x,[object Object],GETARG 1 ; fetch y,[object Object],ADD,[object Object],RETURN,[object Object],functionAdd(x, y) {return x + y;},[object Object]
Interpreter,[object Object],case OP_ADD: {        Value lhs = POP();        Value rhs = POP();        Value result;if (lhs.isInt32() && rhs.isInt32()) {int left = rhs.toInt32();int right = rhs.toInt32();if (AddOverflows(left, right, left + right))                result.setInt32(left + right);elseresult.setNumber(double(left) + double(right));        } elseif (lhs.isString() || rhs.isString()) {            String *left = ValueToString(lhs);            String *right = ValueToString(rhs);            String *r = Concatenate(left, right);result.setString(r);        } else {double left = ValueToNumber(lhs);double right = ValueToNumber(rhs);result.setDouble(left + right);        }PUSH(result);break;,[object Object]
Assembling ADD,[object Object],[object Object]
Observation:
Some input types much more common than others,[object Object]
Assembling ADD,[object Object],[object Object]
Large design space
Can consider integers common, or
Integers and doubles, or
Anything!,[object Object]
Basic JIT - ADD,[object Object],if (arg0.type != INT32) gotoslow_add;if (arg1.type != INT32)gotoslow_add;,[object Object],R0 = arg0.data,[object Object],R1 = arg1.data,[object Object],Greedy Register Allocator,[object Object]
Basic JIT - ADD,[object Object],if (arg0.type != INT32) gotoslow_add;if (arg1.type != INT32)gotoslow_add;,[object Object],R0 = arg0.data;R1 = arg1.data;,[object Object],R2 = R0 + R1;,[object Object],if (OVERFLOWED)gotoslow_add;,[object Object]
Slow Paths,[object Object],slow_add:    Value result = runtime::Add(arg0, arg1);,[object Object]
Inline,[object Object],Out-of-line,[object Object],if (arg0.type != INT32) gotoslow_add;if (arg1.type != INT32)gotoslow_add;R0 = arg0.data;R1 = arg1.data;R2 = R0 + R1;  if (OVERFLOWED)gotoslow_add;rejoin:,[object Object],slow_add:    Value result = Interpreter::Add(arg0, arg1);,[object Object],R2 = result.data;,[object Object],goto rejoin;,[object Object]
Rejoining,[object Object],Inline,[object Object],Out-of-line,[object Object],  if (arg0.type != INT32) gotoslow_add;  if (arg1.type != INT32)gotoslow_add;  R0 = arg0.data;  R1 = arg1.data;  R2 = R0 + R1;  if (OVERFLOWED)gotoslow_add;,[object Object],R3 = TYPE_INT32;rejoin:,[object Object],slow_add:    Value result = runtime::Add(arg0, arg1);,[object Object],    R2 = result.data;,[object Object],    R3 = result.type;,[object Object],goto rejoin;,[object Object]
Final Code,[object Object],Inline,[object Object],Out-of-line,[object Object],if (arg0.type != INT32) goto slow_add; if (arg1.type != INT32)goto slow_add;R0 = arg0.data;R1 = arg1.data;R2 = R0 + R1;  if (OVERFLOWED)goto slow_add;,[object Object],R3 = TYPE_INT32;rejoin:,[object Object],return Value(R3, R2);,[object Object],slow_add:    Value result = Interpreter::Add(arg0, arg1);,[object Object],R2 = result.data;,[object Object],R3 = result.type;,[object Object],goto rejoin;,[object Object]
Observations,[object Object],Even though we have fast paths, no type information can flow in between opcodes,[object Object],Cannot assume result of ADD is integer,[object Object],Means more branches,[object Object],Types increase register pressure,[object Object]
Basic JIT – Object Access,[object Object],[object Object]
How can we create a fast-path?
We could try to cache the lookup, but
We want it to work for >1 objectsfunctionf(x) {returnx.y;},[object Object]
Object Access,[object Object],Observation,[object Object],Usually, objects flowing through an access site look the same,[object Object],If we knew an object’s layout, we could bypass the dictionary lookup,[object Object]
Object Layout,[object Object],var obj = { x: 50,,[object Object],             y: 100,,[object Object],           z: 20,[object Object],    };,[object Object]
Object Layout,[object Object]
Object Layout,[object Object],varobj = { x: 50,,[object Object],             y: 100,,[object Object],           z: 20,[object Object],    };,[object Object],…,[object Object],varobj2 = { x: 78,,[object Object],             y: 93,,[object Object],             z: 600,[object Object],    };,[object Object]
Object Layout,[object Object]
Familiar Problems,[object Object],We don’t know an object’s shape during JIT compilation,[object Object],... Or even that a property access receives an object!,[object Object],Solution: leave code “blank,” lazily generate it later,[object Object]
Inline Caches,[object Object],functionf(x) {returnx.y;},[object Object]
Inline Caches,[object Object],[object Object],if (arg0.type != OBJECT)gotoslow_property;,[object Object],JSObject *obj = arg0.data;,[object Object]
[object Object], if (arg0.type != OBJECT)gotoslow_property;,[object Object],JSObject *obj = arg0.data;,[object Object],gotoproperty_ic;,[object Object],Inline Caches,[object Object]
Property ICs,[object Object],functionf(x) {returnx.y;},[object Object],f({x: 5, y: 10, z: 30});,[object Object]
Property ICs,[object Object]
Property ICs,[object Object]
Property ICs,[object Object]
Inline Caches,[object Object],[object Object], if (arg0.type != OBJECT)gotoslow_property;,[object Object],JSObject *obj = arg0.data;,[object Object],gotoproperty_ic;,[object Object]
Inline Caches,[object Object],[object Object], if (arg0.type != OBJECT)gotoslow_property;,[object Object],JSObject *obj = arg0.data;,[object Object],gotoproperty_ic;,[object Object]
Inline Caches,[object Object],[object Object],  if (arg0.type != OBJECT)gotoslow_property;,[object Object],JSObject *obj = arg0.data;,[object Object],  if (obj->shape != SHAPE1),[object Object],gotoproperty_ic;,[object Object],R0 = obj->slots[1].type;,[object Object],R1 = obj->slots[1].data;,[object Object]
Polymorphism,[object Object],[object Object]
Add another fast-path...functionf(x) {returnx.y;}f({ x: 5, y: 10, z: 30});f({ y: 40});,[object Object]
Polymorphism,[object Object],Main Method,[object Object], if (arg0.type != OBJECT)gotoslow_path;JSObject *obj = arg0.data;if (obj->shape != SHAPE1)gotoproperty_ic;R0 = obj->slots[1].type;R1 = obj->slots[1].data;rejoin:,[object Object]
Polymorphism,[object Object],Main Method,[object Object],Generated Stub,[object Object],  if (arg0.type != OBJECT)gotoslow_path;JSObject *obj = arg0.data;  if (obj->shape != SHAPE0)gotoproperty_ic;  R0 = obj->slots[1].type;  R1 = obj->slots[1].data;rejoin:,[object Object],  stub:,[object Object],if (obj->shape != SHAPE2)gotoproperty_ic;,[object Object],R0 = obj->slots[0].type;R1 = obj->slots[0].data;,[object Object],goto rejoin;,[object Object]
Polymorphism,[object Object],Main Method,[object Object],Generated Stub,[object Object],if (arg0.type != OBJECT)    goto slow_path;  JSObject *obj = arg0.data;if (obj->shape != SHAPE1)goto stub;  R0 = obj->slots[1].type;  R1 = obj->slots[1].data;rejoin:,[object Object],  stub:,[object Object],if (obj->shape != SHAPE2)goto property_ic;,[object Object],R0 = obj->slots[0].type;R1 = obj->slots[0].data;,[object Object],goto rejoin;,[object Object]
Chain of Stubs,[object Object],if(obj->shape == S1) {,[object Object],    result = obj->slots[0];,[object Object],} else {,[object Object],if (obj->shape == S2) {,[object Object],        result = obj->slots[1];,[object Object],    } else {,[object Object],if (obj->shape == S3) {,[object Object],             result = obj->slots[2];,[object Object],        } else {,[object Object],if (obj->shape == S4) {,[object Object],                result = obj->slots[3];,[object Object],            } else {,[object Object],goto property_ic;,[object Object],            },[object Object],        },[object Object],    },[object Object],},[object Object]
Code Memory,[object Object],[object Object]
Self-modifying, but single threaded
Code memory is always rwx
Concerned about protection-flipping expense,[object Object]
Inline caches adapt code based on runtime observations
Lots of guards, poor type information,[object Object]
We could generate an IR, but without type information...
Slow paths prevent most optimizations.,[object Object]
Code Motion?,[object Object],functionAdd(x, n) {,[object Object],varsum = 0;,[object Object],vartemp0 = x + n;for (vari = 0; i < n; i++),[object Object],        sum += temp0;,[object Object],    return sum;},[object Object],Let’s try it.,[object Object]
Wrong Result,[object Object],var global =0;varobj= {valueOf: function () {return++global;    }}Add(obj, 10);,[object Object],[object Object]
Hoisted version returns 110!,[object Object]
Ideal Scenario,[object Object],[object Object]
Remove slow paths

Contenu connexe

Tendances

Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Sumant Tambe
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - CJussi Pohjolainen
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Sumant Tambe
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...Positive Hack Days
 
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizationsEgor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizationsEgor Bogatov
 
BayFP: Concurrent and Multicore Haskell
BayFP: Concurrent and Multicore HaskellBayFP: Concurrent and Multicore Haskell
BayFP: Concurrent and Multicore HaskellBryan O'Sullivan
 
Cocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicCocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicBadoo Development
 
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiCysinfo Cyber Security Community
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Chris Adamson
 
DEFUN 2008 - Real World Haskell
DEFUN 2008 - Real World HaskellDEFUN 2008 - Real World Haskell
DEFUN 2008 - Real World HaskellBryan O'Sullivan
 
Memory efficient pytorch
Memory efficient pytorchMemory efficient pytorch
Memory efficient pytorchHyungjoo Cho
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Ganesh Samarthyam
 

Tendances (20)

Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)
 
The Style of C++ 11
The Style of C++ 11The Style of C++ 11
The Style of C++ 11
 
Python Scipy Numpy
Python Scipy NumpyPython Scipy Numpy
Python Scipy Numpy
 
Introduction to Objective - C
Introduction to Objective - CIntroduction to Objective - C
Introduction to Objective - C
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)
 
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
The System of Automatic Searching for Vulnerabilities or how to use Taint Ana...
 
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizationsEgor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
 
BayFP: Concurrent and Multicore Haskell
BayFP: Concurrent and Multicore HaskellBayFP: Concurrent and Multicore Haskell
BayFP: Concurrent and Multicore Haskell
 
Scientific Python
Scientific PythonScientific Python
Scientific Python
 
Java Script Workshop
Java Script WorkshopJava Script Workshop
Java Script Workshop
 
Cocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magicCocoaheads Meetup / Alex Zimin / Swift magic
Cocoaheads Meetup / Alex Zimin / Swift magic
 
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
 
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
Oh Crap, I Forgot (Or Never Learned) C! [CodeMash 2010]
 
What's New in C++ 11?
What's New in C++ 11?What's New in C++ 11?
What's New in C++ 11?
 
DEFUN 2008 - Real World Haskell
DEFUN 2008 - Real World HaskellDEFUN 2008 - Real World Haskell
DEFUN 2008 - Real World Haskell
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Memory efficient pytorch
Memory efficient pytorchMemory efficient pytorch
Memory efficient pytorch
 
Using Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUGUsing Parallel Computing Platform - NHDNUG
Using Parallel Computing Platform - NHDNUG
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
 
C language
C languageC language
C language
 

Similaire à Intel JIT Talk

Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Juan Pablo
 
Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...Andrii Gakhov
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Romain Francois
 
Cluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CCluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CSteffen Wenz
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerAndrey Karpov
 
C Programming Language
C Programming LanguageC Programming Language
C Programming LanguageRTS Tech
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Romain Francois
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisFastly
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?Kevin Pilch
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsAmal Khailtash
 
How much performance can you get out of Javascript? - Massimiliano Mantione -...
How much performance can you get out of Javascript? - Massimiliano Mantione -...How much performance can you get out of Javascript? - Massimiliano Mantione -...
How much performance can you get out of Javascript? - Massimiliano Mantione -...Codemotion
 
掀起 Swift 的面紗
掀起 Swift 的面紗掀起 Swift 的面紗
掀起 Swift 的面紗Pofat Tseng
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Datagreenwop
 

Similaire à Intel JIT Talk (20)

Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
Code optimization
Code optimization Code optimization
Code optimization
 
Code optimization
Code optimization Code optimization
Code optimization
 
Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...Too Much Data? - Just Sample, Just Hash, ...
Too Much Data? - Just Sample, Just Hash, ...
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
Cluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in CCluj.py Meetup: Extending Python in C
Cluj.py Meetup: Extending Python in C
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
 
Rcpp: Seemless R and C++
Rcpp: Seemless R and C++Rcpp: Seemless R and C++
Rcpp: Seemless R and C++
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
Monads in Swift
Monads in SwiftMonads in Swift
Monads in Swift
 
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
 
How much performance can you get out of Javascript? - Massimiliano Mantione -...
How much performance can you get out of Javascript? - Massimiliano Mantione -...How much performance can you get out of Javascript? - Massimiliano Mantione -...
How much performance can you get out of Javascript? - Massimiliano Mantione -...
 
掀起 Swift 的面紗
掀起 Swift 的面紗掀起 Swift 的面紗
掀起 Swift 的面紗
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
 

Dernier

Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?IES VE
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 

Dernier (20)

20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?How Accurate are Carbon Emissions Projections?
How Accurate are Carbon Emissions Projections?
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 

Intel JIT Talk

Notes de l'éditeur

  1. I’m going to start off by showing my favorite demo, that I think really captures what we’re enabling by making the browser as fast possible.
  2. So this is Doom, translated - actually compiled - from C++ to JavaScript, being played in Firefox. In addition to JavaScript it’s using the new 2D drawing element called Canvas. This demo is completely native to the browser. There’s no Flash, it’s all open web technologies. And it’s managing to get a pretty good framerate, 30fps, despite being mostly unoptimized. This is a really cool demo for me because, three years ago, this kind of demo on the web was just impossible without proprietary extensions. Some of the technology just wasn’t there, and the rest of it was anywhere from ten to a hundred times slower. So we’ve come a long way.… Unfortunately all I have of the demo is a recording, it was playable online for about a day but iD Software requested that we take it down.
  3. To step back for a minute, I’m going to briefly overview how the browser and the major web technologies interact, and then jump into JavaScript which is the heart of this talk.
  4. This is a much less gory example, a major company’s website in a popular web browser. The process of getting from the intel.com URL to this display is actually pretty complicated.
  5. The browser then sends intel.com this short plaintext message which says, “give me the webpage corresponding to the top of your website’s hierarchy.”
  6. How does the browser get from all of this to the a fully rendered website?
  7. Now that we’re familiar with the language’s main features, let’s talk about implementing a JavaScript engine. A JavaScript implementation has four main pieces
  8. One of the challenges of a JavaScript engine is dealing with the lack of type declarations. In order to dispatch the correct computation, the runtime must be able to query a variable or field’s current type.
  9. We’re done with data representation and garbage collection, so it’s time for the really fun stuff: running JavaScript code, and making it run fast. One way to run code, but not make it run fast, is to use an interpreter.