future tense

32
mozilla Future Tense 1 Friday, April 29, 2011

Upload: brendan-eich

Post on 15-Jan-2015

5.071 views

Category:

Documents


1 download

DESCRIPTION

A talk I gave at Mozilla's last all-hands about Rust and Servo

TRANSCRIPT

Page 1: Future Tense

mozilla

Future Tense

1

Friday, April 29, 2011

Page 2: Future Tense

mozilla

Future Tense

• “No fate but what we make.” - Sarah Connor, T2

1

Friday, April 29, 2011

Page 3: Future Tense

mozilla

Future Tense

• “No fate but what we make.” - Sarah Connor, T2

• “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee

1

Friday, April 29, 2011

Page 4: Future Tense

mozilla

Future Tense

• “No fate but what we make.” - Sarah Connor, T2

• “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee

• This talk is about the future, both what it will bring and what we want from it.

1

Friday, April 29, 2011

Page 5: Future Tense

mozilla

Future Tense

• “No fate but what we make.” - Sarah Connor, T2

• “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee

• This talk is about the future, both what it will bring and what we want from it.

• At Mozilla Summit 2010, we launched Rust, a new programming language motivated by safety and concurrency for parallel hardware, the “manycore” future which is upon us.

1

Friday, April 29, 2011

Page 6: Future Tense

mozilla

Future Tense

• “No fate but what we make.” - Sarah Connor, T2

• “Leaders can imagine a world that others don’t. Like Thomas Jefferson or that kid in the Terminator movies.” - Finn, Glee

• This talk is about the future, both what it will bring and what we want from it.

• At Mozilla Summit 2010, we launched Rust, a new programming language motivated by safety and concurrency for parallel hardware, the “manycore” future which is upon us.

• This talk is a recap of motivation and a status report...

1

Friday, April 29, 2011

Page 7: Future Tense

mozilla

Mobile vs. desktop slowdown

• From “Fast and Parallel Webpage Layout”, Meyerovich & Bodik, WWW2010, this chart shows how “the power wall” hurts mobile single-core performance, driving mobile to manycore and requiring a parallel browser engine “real soon now”:

2

Friday, April 29, 2011

Page 8: Future Tense

mozilla

Data flow in a browser engine

• Traditionally mostly single-threaded, using C++ as implementation language, with threads for image decoding, speculative script prefetching, rendering.

3

Friday, April 29, 2011

Page 9: Future Tense

mozilla

Must parallelize every stage to win

• Even use data-parallel (SIMD) instructions as well... Amdahl’s Law bites.

4

Friday, April 29, 2011

Page 10: Future Tense

mozilla

The “pwn2own” problem

5

Friday, April 29, 2011

Page 11: Future Tense

mozilla

The “pwn2own” problem

• Every browser has endless security vulnerabilities due to lack of safety in the main implementation language (C++, formerly C -- used for speed not safety).

5

Friday, April 29, 2011

Page 12: Future Tense

mozilla

The “pwn2own” problem

• Every browser has endless security vulnerabilities due to lack of safety in the main implementation language (C++, formerly C -- used for speed not safety).

• Chrome and Firefox survived this year’s pwn2own contest, but no boasting from Mozilla on this count. And Chrome has been hacked elsewhere, too.

5

Friday, April 29, 2011

Page 13: Future Tense

mozilla

The “pwn2own” problem

• Every browser has endless security vulnerabilities due to lack of safety in the main implementation language (C++, formerly C -- used for speed not safety).

• Chrome and Firefox survived this year’s pwn2own contest, but no boasting from Mozilla on this count. And Chrome has been hacked elsewhere, too.

• We have millions of lines of C++ in Gecko, both too-often unsafe due to memory management bugs, and mostly single-threaded -- so slow on manycore mobile devices.

5

Friday, April 29, 2011

Page 14: Future Tense

mozilla

The “pwn2own” problem

• Every browser has endless security vulnerabilities due to lack of safety in the main implementation language (C++, formerly C -- used for speed not safety).

• Chrome and Firefox survived this year’s pwn2own contest, but no boasting from Mozilla on this count. And Chrome has been hacked elsewhere, too.

• We have millions of lines of C++ in Gecko, both too-often unsafe due to memory management bugs, and mostly single-threaded -- so slow on manycore mobile devices.

• Adding more threads to utilize multiple cores while fighting security bugs is like team-juggling chainsaws to music where the record player has been sped up!

5

Friday, April 29, 2011

Page 15: Future Tense

mozilla

Project Servo

6

Friday, April 29, 2011

Page 16: Future Tense

mozilla

Project Servo

• A new, safer systems programming language, Rust, instead of C++

6

Friday, April 29, 2011

Page 17: Future Tense

mozilla

Project Servo

• A new, safer systems programming language, Rust, instead of C++

• Research building parallel browser engine stages in Rust

6

Friday, April 29, 2011

Page 18: Future Tense

mozilla

Project Servo

• A new, safer systems programming language, Rust, instead of C++

• Research building parallel browser engine stages in Rust

• Experiment with Andreas Gal’s DOM implemented in JavaScript

6

Friday, April 29, 2011

Page 19: Future Tense

mozilla

Project Servo

• A new, safer systems programming language, Rust, instead of C++

• Research building parallel browser engine stages in Rust

• Experiment with Andreas Gal’s DOM implemented in JavaScript

• For a scalably-faster-on-manycore, much safer Browser from the Future

6

Friday, April 29, 2011

Page 20: Future Tense

mozilla

Project Servo

• A new, safer systems programming language, Rust, instead of C++

• Research building parallel browser engine stages in Rust

• Experiment with Andreas Gal’s DOM implemented in JavaScript

• For a scalably-faster-on-manycore, much safer Browser from the Future

• Rust is good for Servers and other Software from the Future, too

6

Friday, April 29, 2011

Page 21: Future Tense

mozilla

nbody.rs

7

Friday, April 29, 2011

Page 22: Future Tense

mozilla

Rust performance results (nbody)

8

Friday, April 29, 2011

Page 23: Future Tense

mozilla

fannkuchredux.rs

9

Friday, April 29, 2011

Page 24: Future Tense

mozilla

Rust performance results (fannkuch)

10

Friday, April 29, 2011

Page 25: Future Tense

mozilla

What it all means

11

Friday, April 29, 2011

Page 26: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

11

Friday, April 29, 2011

Page 27: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

• The -rust-unsafe versions are competitive with their -gcc and -clang counterparts (fannkuch-rust-unsafe actually wins!).

11

Friday, April 29, 2011

Page 28: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

• The -rust-unsafe versions are competitive with their -gcc and -clang counterparts (fannkuch-rust-unsafe actually wins!).

• The -rust (safe) versions are currently about twice as slow as the C versions.

11

Friday, April 29, 2011

Page 29: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

• The -rust-unsafe versions are competitive with their -gcc and -clang counterparts (fannkuch-rust-unsafe actually wins!).

• The -rust (safe) versions are currently about twice as slow as the C versions.

• We will reduce the cost of safety with ongoing, serious optimization effort.

11

Friday, April 29, 2011

Page 30: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

• The -rust-unsafe versions are competitive with their -gcc and -clang counterparts (fannkuch-rust-unsafe actually wins!).

• The -rust (safe) versions are currently about twice as slow as the C versions.

• We will reduce the cost of safety with ongoing, serious optimization effort.

• Rust allows unsafe modules and functions, so we can dial in the remaining cost that is not forgiven due to speedups on parallel hardware.

11

Friday, April 29, 2011

Page 31: Future Tense

mozilla

What it all means

• First, these are just two of many benchmarks to conquer; Rust is still young.

• The -rust-unsafe versions are competitive with their -gcc and -clang counterparts (fannkuch-rust-unsafe actually wins!).

• The -rust (safe) versions are currently about twice as slow as the C versions.

• We will reduce the cost of safety with ongoing, serious optimization effort.

• Rust allows unsafe modules and functions, so we can dial in the remaining cost that is not forgiven due to speedups on parallel hardware.

• The Servo parallel browser engine project is starting, here and now.

11

Friday, April 29, 2011

Page 32: Future Tense

mozilla

12

Friday, April 29, 2011