-
Notifications
You must be signed in to change notification settings - Fork 208
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
I'm using this toolchain in order to create a simple wasm module for use with wagi. The wasm module size has a significant impact on the time it takes to respond to a request - as per deislabs/wagi#3
With this simple example:
#include <iostream>
using namespace std;
int main() {
cout << "Content-Type: text/plain\n";
cout << "\n";
cout << "hello world C++";
}
Compiled as follows:
/wasi-sdk-11.0/bin/clang++ --sysroot=/wasi-sdk-11.0/share/wasi-sysroot test.cpp -o test.wasm
The test.wasm
output is 606 KBytes.
If I optimise with wasm-opt
:
wasm-opt -Oz test.wasm -o test.wasm
It drops to 209 KBytes, which is still a lot larger than I'd expect.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed