From 52f80e9e635b4d8ce441983352a9a4dcb535e144 Mon Sep 17 00:00:00 2001 From: Volodymyr Shymanskyy Date: Mon, 29 Mar 2021 12:44:15 +0300 Subject: [PATCH] Optimize performance of pywasm3 --- platforms/python/setup.py | 4 +++- source/m3_core.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platforms/python/setup.py b/platforms/python/setup.py index afc1d90..60f857a 100755 --- a/platforms/python/setup.py +++ b/platforms/python/setup.py @@ -21,7 +21,9 @@ setup( ext_modules=[ Extension('wasm3', sources=SOURCES, include_dirs=['m3'], - extra_compile_args=['-g0', '-O3', '-DDEBUG', '-DNASSERTS']) + extra_compile_args=['-g0', '-O3', '-march=native', + '-fomit-frame-pointer', '-fno-stack-check', '-fno-stack-protector', + '-DDEBUG', '-DNASSERTS']) ], classifiers = [ diff --git a/source/m3_core.h b/source/m3_core.h index 3cac1a3..0f2d9d7 100644 --- a/source/m3_core.h +++ b/source/m3_core.h @@ -121,7 +121,7 @@ const void * const cvptr_t; # endif -# if (defined(DEBUG)) +# if (defined(DEBUG) && !defined(NASSERTS)) # define d_m3Assert(ASS) if (!(ASS)) { printf("Assertion failed at %s:%d : %s\n", __FILE__, __LINE__, #ASS); abort(); } # else # define d_m3Assert(ASS)