GithubHelp home page GithubHelp logo

Comments (4)

manuschillerdev avatar manuschillerdev commented on June 20, 2024 4

@juntao that massively sped things up!

wasmedgec target/wasm32-wasi/release/wasmedge_quickjs.wasm target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm

cd example_js/react_ssr/

hyperfine "wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js" "node dist/main.js"
Benchmark #1: wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js
  Time (mean ± σ):     195.1 ms ±   2.2 ms    [User: 144.3 ms, System: 46.0 ms]
  Range (min … max):   192.5 ms … 200.2 ms    15 runs

Benchmark #2: node dist/main.js
  Time (mean ± σ):      55.6 ms ±   1.3 ms    [User: 43.2 ms, System: 9.5 ms]
  Range (min … max):    53.0 ms …  58.5 ms    49 runs

Summary
  'node dist/main.js' ran
    3.51 ± 0.09 times faster than 'wasmedge --dir .:. ../../target/wasm32-wasi/release/wasmedge_quickjs_aot.wasm dist/main.js'

now it's only 3 times slower than the native node process - roughly 10x faster than before :)

Could this be improved even further?

EDIT: this could be added to the readme as well - in case I didn't just missed it

from wasmedge-quickjs.

L-jasmine avatar L-jasmine commented on June 20, 2024

sorry, node have jit, but wasmedge_quickjs.wasm not.
We are trying to faster

from wasmedge-quickjs.

manuschillerdev avatar manuschillerdev commented on June 20, 2024

Could something like https://github.com/bytecodealliance/wizer help with pre-compiling?

from wasmedge-quickjs.

juntao avatar juntao commented on June 20, 2024

@manuschillerdev I want to make sure that you did wasmedgec on the wasmedge-quickjs.wasm file.

from wasmedge-quickjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.