diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-14 01:17:44 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-14 01:17:44 +0900 |
| commit | f4edb19f21c4777a95a5a8705d0e5f602103eb44 (patch) | |
| tree | d6f7b6a9033767737d4eb7d16b7af007740bc420 | |
| parent | 9bf23e2abf74d70b77726a4300917c78bc8035e7 (diff) | |
| download | php-waddiwasi-f4edb19f21c4777a95a5a8705d0e5f602103eb44.tar.gz php-waddiwasi-f4edb19f21c4777a95a5a8705d0e5f602103eb44.tar.zst php-waddiwasi-f4edb19f21c4777a95a5a8705d0e5f602103eb44.zip | |
perf: disable assertions
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | benchmarks/20240314-0116.log | 4 | ||||
| -rw-r--r-- | prof.sh | 2 | ||||
| -rw-r--r-- | test.sh | 2 | ||||
| -rw-r--r-- | traces/20240314-0116.stderr.log | 8 |
6 files changed, 16 insertions, 4 deletions
@@ -8,7 +8,7 @@ bench: .PHONY: run run: - php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php + php -d zend.assertions=-1 -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php .PHONY: test test: @@ -11,7 +11,7 @@ This is a WebAssembly runtime written in pure PHP. The PHP runtime can be compiled to WebAssembly binary. This Wasm runtime can execute it. Currently, "Hello, World!" program works on the PHP runtime on the Wasm runtime. ``` -$ php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php +$ php -d zend.assertions=-1 -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php ``` diff --git a/benchmarks/20240314-0116.log b/benchmarks/20240314-0116.log new file mode 100644 index 0000000..7a11572 --- /dev/null +++ b/benchmarks/20240314-0116.log @@ -0,0 +1,4 @@ +Benchmark 1: make run + Time (mean ± σ): 3.513 s ± 0.021 s [User: 3.451 s, System: 0.062 s] + Range (min … max): 3.464 s … 3.543 s 10 runs + @@ -2,4 +2,4 @@ timestamp="$(date '+%Y%m%d-%H%M')" # php -d 'error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/bin/reli inspector:trace -o traces/"$timestamp".log -- php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log # vendor/bin/reli converter:flamegraph < traces/"$timestamp".log > traces/"$timestamp".svg -php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log +php -d zend.assertions=-1 -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2> traces/"$timestamp".stderr.log @@ -1,4 +1,4 @@ -result=$(php -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2>/dev/null) +result=$(php -d zend.assertions=-1 -d memory_limit=256M -d opcache.enable_cli=on -d opcache.jit=on -d opcache.jit_buffer_size=1G examples/php-on-wasm/php-wasm.php 2>/dev/null) if [[ "$result" == 'Hello, World!' ]]; then echo "Test passed" exit 0 diff --git a/traces/20240314-0116.stderr.log b/traces/20240314-0116.stderr.log new file mode 100644 index 0000000..fa04b0d --- /dev/null +++ b/traces/20240314-0116.stderr.log @@ -0,0 +1,8 @@ +Decoding... +Instantiating... +Executing... + +Exit code: 0 +Memory peak usage: 194434328 + + |
