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++.



#javascript #c++

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