Speed, Speed, Speed: JavaScript vs C++ vs WebAssembly - Franziska Hinkelmann, Google

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ย. 2024
  • In Node.js, we can use WebAssembly modules and native C++ addons. If your app has performance critical parts, should you stay in JavaScript? Or write a native C++ addon? Or use WebAssembly? We’ll look at how these options compare performance wise and which one is best for different workloads. So the next time you need to optimize for speed, you know your options.

ความคิดเห็น • 14

  • @BenderdickCumbersnatch
    @BenderdickCumbersnatch 3 ปีที่แล้ว +1

    Just use TypeScript and AssemblyScript (a specialized version of TypeScript) and you can make WASM entirely in a TypeScript-like language. This gives you safe, type-based javascript and WebAssembly without having to learn other languages. They acknowledge that it won't be as fast as optimal WebAssembly from Rust, but it's good enough for most things.

  • @fabianmarcus
    @fabianmarcus 4 ปีที่แล้ว +7

    Sehr geil erklärt. Vielen Dank!

  • @leors7578
    @leors7578 3 ปีที่แล้ว +1

    pretty good concise talk

  • @smilingx4-189
    @smilingx4-189 3 ปีที่แล้ว +2

    Good talk, I love benchmarks

    • @IARRCSim
      @IARRCSim 3 ปีที่แล้ว

      yeah. I wish there were a few other algorithms tested, though. Benchmarks for 3 or 4 algorithms and ran with Chrome, Firefox, Edge would be a lot better. It would be nice to know if any of them have much different results.

  • @Androide7461
    @Androide7461 4 ปีที่แล้ว +2

    What I don't quite get is that, when you compared JavaScript to C++ to WebAssembly at 24:07, isn't there a speed difference in WebAssembly between "c++ - webassembly", "rust - webassembly" and "c - webassembly"?

    • @avimehenwal
      @avimehenwal 4 ปีที่แล้ว +5

      webassembly is like an IR (Intermediate representation) standard ready to be executed in browser. No matter which source language you use like C/ C++ or Rust, they all will get compiled to almost similar wasm binary code. Therefore, I think "c++ - webassembly", "rust - webassembly" and "c - webassembly" should all product similar wasm binary and hence similar performance results.
      Hope it helps! Cheers and Peace

  • @nothingisreal6345
    @nothingisreal6345 3 ปีที่แล้ว +2

    The thing you should consider: optimizing the performance of JavaScript has maybe saved as much energy as replacing refrigerators from A+ to A++ energy rating.

  • @someonesomewhere1879
    @someonesomewhere1879 4 ปีที่แล้ว +4

    Very good talk. Great for understanding the basics of JS / WASM

    • @IARRCSim
      @IARRCSim 3 ปีที่แล้ว

      Great performance comparison too.

  • @trietti97
    @trietti97 3 ปีที่แล้ว

    Would you like to give me the scientific paper including these results?
    Thank you.

  • @ridhadepot1301
    @ridhadepot1301 3 ปีที่แล้ว +1

    Comparing C++ with Javascript is like comparing :
    Potaetos with tomatoes

  • @railbatyrshin7349
    @railbatyrshin7349 2 ปีที่แล้ว

    two hundred first bleat'!

  • @Ihavetoreturnsomevideotapes
    @Ihavetoreturnsomevideotapes 3 ปีที่แล้ว

    I thought he was dude