Hirdetés

Keresés

Új hozzászólás Aktív témák

  • Zedz
    addikt

    The Wasm stack machine is designed to be encoded in a size- and load-time-efficient binary format. WebAssembly aims to execute at native speed by taking advantage of common hardware capabilities available on a wide range of platforms.

    Jobban utána olvasva, nem a js engine-en fut. Ugyan nem ismerem a konkrét implementációt, de gondolom, akkor tud natív sebességgel futni, ha valahol mélyen fut, minél közelebb a vashoz.

    Ez alapjan a JS motor futtatja a WASM binarist.

    "akkor tud natív sebességgel futni"
    Nem nativ sebesseggel fut, csak ahhoz nagyon kozel.

    Parsing JavaScript involves transforming plain text to a data structure called abstract syntax tree (AST) and turning that into binary format. WebAssembly is delivered as binary and decoding it happens much faster. It’s statically typed so, unlike with JavaScript, the engine doesn’t need to speculate during compilation about what types will be used. Most of the optimization happens during the compilation of source code, before it even gets into the browser. Memory is managed manually, just like in languages like C and C++, so there’s no garbage collection either. All of this gives better and more reliable performance. The execution time of WASM binaries is just 20% slower than the execution of same native code.

    Szerk.: +1 megjegyzes togvau kolleganak; a WASM celja sose volt a JS "kenyszert" lecserelni. A kettonek egyutt van es lesz is ertelme.

Új hozzászólás Aktív témák