Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 1.36 KB

concurrency-and-parallelism-in-js.md

File metadata and controls

23 lines (21 loc) · 1.36 KB

"Concurrency & Parallelism in JS" by Naveed Ihsanullah

(video)

  • Concurrency & parallelism Analogy of difference between concurrency and parallelism
    • Concurrency is having multiple tasks run together (multitasking)
    • Parallelism is actually executing tasks separately (in hardware)
  • Browser implementations of JS is fast and getting faster with asm.js etc
  • Parallelism is bottlenecked by the hardware, and concurrency is bottlenecked by waiting on responses.
  • Improving parallelism
  • Improving concurrency
  • Native has solved this. Do similar on the web: shared memory for JS
    • postMessage() + SharedArrayBuffer
    • use SharedInt32Array to view on it
    • the low-level details can be abstracted
  • Availability
    • Landed in Firefox Nightly.
    • Announced for future Chrome too.
    • Unfortunately can't be polyfilled.