When will we be able to use any programming language in the web?

  • Praise Idleness@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 day ago

    Important to note that WASM will only give you enough performance boost to justify using it if the task is significantly demaning to JS. JS is not slow.

    • xigoi@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      4 hours ago

      JavaScript is slow if you need to do things that JavaScript can’t do, such as

      • lots of stack-allocated objects/arrays (in JavaScript you have to heap-allocate them)
      • hash maps with non-primitive types as keys (in JavaScript you have to serialize them to a string)
      • count trailing zero bits (in JavaScript you have to use a lookup table)
    • Ace! _SL/S@ani.social
      link
      fedilink
      arrow-up
      5
      ·
      1 day ago

      JS is not slow.

      Since JS is single threaded it can be pretty slow compared to anything being able to use multiple threads

    • spacecadet@lemm.ee
      link
      fedilink
      arrow-up
      7
      ·
      1 day ago

      JS is slow, but I program Rust and Scala. Every internal app at my company is react based and I spend most my time waiting for that bloated framework to load a simple table. It can take seconds to load a 20 route paginated table from source.