How Slow is JavaScript Really? JavaScript vs C++ (Data Structures & Optimization)

Published: 20 April 2021
on channel: SimonDev
292,789
10k

Is JavaScript really that slow? Or is that just a leftover impression from the old days?

Patreon:   / simondevyt  

Follow me on:
Twitter:   / iced_coffee_dev  
Instagram:   / beer_and_code  
Github: https://github.com/simondevyoutube/

In this video we talk a bit about JavaScript vs C++, and the performance difference between them. We'll talk quickly about the history of JavaScript before working through a few small benchmarks to compare performance between them, using various optimization levels for gcc. It's kind of interesting to see how much JavaScript's performance has evolved with JIT (just in time) compilation since the early Netscape days. The v8 team has made enormous strides in performance and is narrowing the gap with C++ year by year. We'll also walk through some examples of what you can do with your basic C++ code to squeeze more performance out, either by using better compiler flags or SSE/AVX intrinsics to get better usage out of your CPU.

What's covered:
Super brief history of JavaScript and V8
Benchmarks and comparison of JavaScript vs C++
SSE and AVX intrinsics
gcc -Ofast and float associativity
Some closing thoughts on JavaScript's performance today, as well as C++.


Speed, Speed, Speed: JavaScript vs C++ vs WebAssembly:
   • Speed, Speed, Speed: JavaScript vs C+...  

Godbolt:
https://godbolt.org/

Wikipedia:
https://en.wikipedia.org/wiki/JavaScript
https://en.wikipedia.org/wiki/Associa...

Various blog posts from V8 team:
https://blog.chromium.org/2010/12/new...
https://v8.dev/blog/10-years
https://v8.dev/blog/launching-ignitio...
https://v8.dev/blog/adaptor-frame
https://v8.dev/blog/high-performance-...
https://v8.dev/blog/fast-super
https://v8.dev/blog/preparser
https://v8.dev/blog/spread-elements
https://v8.dev/blog/background-compil...
https://v8.dev/blog/fast-properties
https://v8.dev/blog/fast-for-in


On this page of the site you can watch the video online How Slow is JavaScript Really? JavaScript vs C++ (Data Structures & Optimization) with a duration of hours minute second in good quality, which was uploaded by the user SimonDev 20 April 2021, share the link with friends and acquaintances, this video has already been watched 292,789 times on youtube and it was liked by 10 thousand viewers. Enjoy your viewing!