You Don't Know JS: Async & Performance

You Don't Know JS: Async & Performance

by Kyle Simpson

Paperback

$24.99
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Wednesday, February 20

Product Details

ISBN-13: 9781491904220
Publisher: O'Reilly Media, Incorporated
Publication date: 03/09/2015
Pages: 296
Sales rank: 477,017
Product dimensions: 5.90(w) x 8.80(h) x 0.70(d)

About the Author

Kyle Simpson is an Open Web Evangelist from Austin, TX. He's passionate about JavaScript, HTML5, real-time/peer-to-peer communications, and web performance. Otherwise, he's probably bored by it. Kyle is an author, workshop trainer, tech speaker, and avid OSS community member.

Table of Contents

Foreward v

Preface viii

1 Asynchrony: Now & Later 1

A Program in Chunks 2

Event Loop 5

Parallel Threading 8

Concurrency 13

Jobs 23

Statement Ordering 24

Review 27

2 Callbacks 29

Continuations 30

Sequential Brain 31

Trust Issues 39

Trying to Save Callbacks 44

Review 49

3 Promises 51

What Is a Promise? 52

Thenable Duck Typing 64

Promise Trust 67

Chain Flow 76

Error Handling 87

Promise Patterns 94

Promise API Recap 102

Promise Limitations 106

Review 119

4 Generators 121

Breaking Run-to-Completion 121

Generator-ing Values 133

Iterating Generators Asynchronously 141

Generators+Promises 146

Generator Delegation 156

Generator Concurrency 165

Thunks 170

Pre-ES6 Generators 177

Review 184

5 Program Performance 187

Web Workers 188

SIMD 196

asm.js 197

Review 201

6 Benchmarking & Tuning 203

Benchmarking 203

Context Is King 208

jsPerf.com 211

Writing Good Tests 216

Microperformance 216

Tail Call Optimization (TCO) 225

Review 228

A asynquence Library 229

B Advanced Async Patterns 253

C Acknowledgments 277

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews