SQLite 3.41.2, prefer speed over size.

This commit is contained in:
Nuno Cruces
2023-03-23 00:44:43 +00:00
parent 859a21ef4e
commit b19c12c4c7
9 changed files with 32 additions and 61 deletions

View File

@@ -3,7 +3,7 @@ set -eo pipefail
cd -P -- "$(dirname -- "$0")"
zig cc --target=wasm32-wasi -flto -g0 -Os \
zig cc --target=wasm32-wasi -flto -g0 -O2 \
-o mptest.wasm main.c \
-I../../../sqlite3/ \
-mmutable-globals \
@@ -14,9 +14,4 @@ zig cc --target=wasm32-wasi -flto -g0 -Os \
-DSQLITE_DEFAULT_LOCKING_MODE=0 \
-DHAVE_USLEEP -DSQLITE_NO_SYNC \
-DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION \
-D_WASI_EMULATED_GETPID -lwasi-emulated-getpid
if which wasm-opt; then
wasm-opt -g -O -o mptest.tmp mptest.wasm
mv mptest.tmp mptest.wasm
fi
-D_WASI_EMULATED_GETPID -lwasi-emulated-getpid

4
tests/mptest/testdata/mptest.wasm vendored Normal file → Executable file
View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:af307c3555fcf5f78e07a079d8f099400c3e013508f30f5efbe3b7f259be2092
size 969309
oid sha256:eaf30c1ff0cf5acc241c9f7c1ae4c71401ea2be1bd565d67ca913449ef81e542
size 1630832

View File

@@ -3,15 +3,10 @@ set -eo pipefail
cd -P -- "$(dirname -- "$0")"
zig cc --target=wasm32-wasi -flto -g0 -Os \
zig cc --target=wasm32-wasi -flto -g0 -O2 \
-o speedtest1.wasm main.c \
-I../../../sqlite3/ \
-mmutable-globals \
-mbulk-memory -mreference-types \
-mnontrapping-fptoint -msign-ext \
-D_HAVE_SQLITE_CONFIG_H
if which wasm-opt; then
wasm-opt -g -O -o speedtest1.tmp speedtest1.wasm
mv speedtest1.tmp speedtest1.wasm
fi
-D_HAVE_SQLITE_CONFIG_H

4
tests/speedtest1/testdata/speedtest1.wasm vendored Normal file → Executable file
View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2058b59b052ce9e3ed74c241f06122e8acfe0b5d4a18f36130e625b34eecd161
size 1001469
oid sha256:20619ab46d578da689d08c2e6b1d08b7d4919eb7de20f8220bf3a49014083c87
size 1676135