Comments (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.
sorry, node have jit, but wasmedge_quickjs.wasm not.
We are trying to faster
from wasmedge-quickjs.
Could something like https://github.com/bytecodealliance/wizer help with pre-compiling?
from wasmedge-quickjs.
@manuschillerdev I want to make sure that you did wasmedgec
on the wasmedge-quickjs.wasm
file.
from wasmedge-quickjs.
Related Issues (20)
- Error running `react_ssr_stream` example HOT 2
- How to import a third-party nodejs library HOT 1
- README example run failed
- What is the quickjs source code? HOT 3
- Support for TLS-Less Builds? HOT 7
- process.argv undefined HOT 2
- Build without SIMD HOT 9
- The symbol "Stats" has already been declared HOT 9
- QuickJS license compliance HOT 2
- How to progress promises HOT 3
- Update QuickJS to latest, major bugs HOT 3
- Error stack traces HOT 5
- Get should be GET
- ServerResponse must have finished property
- fs.FileHandle is not defined or not a function
- opts is not an object HOT 1
- Http connection ends after async operation in Express
- Files over certain size don't seem to return correctly HOT 2
- JsFunction bind not a function
- Is another release planned? (v0.6.0-alpha?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasmedge-quickjs.