diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-08-25 14:10:09 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-08-25 14:10:09 -0700 |
commit | f35fa61a20a81d0ccbca414a3e4202b21a9c84cb (patch) | |
tree | 6c69d42df283dbdb0d478b4a447cf098b978c0e0 | |
parent | c14a675125a6d94d80561e986549280eee5e958d (diff) |
disable precise i32 multiplication even in -O0: too slow
-rwxr-xr-x | emcc | 6 | ||||
-rw-r--r-- | src/settings.js | 2 | ||||
-rw-r--r-- | tools/shared.py | 1 |
3 files changed, 3 insertions, 6 deletions
@@ -140,12 +140,10 @@ Options that are modified or new in %s include: optimizations, and no runtime assertions or C++ exception catching (to re-enable C++ exception catching, use - -s DISABLE_EXCEPTION_CATCHING=0 ). 32-bit - multiplication is done in JS doubles which - is fast but imprecise for high values. + -s DISABLE_EXCEPTION_CATCHING=0 ). (For details on the affects of different opt levels, see apply_opt_level() in - tools/shared.py) + tools/shared.py and also src/settings.js.) Note: Optimizations are only done when compiling to JavaScript, not to intermediate bitcode. diff --git a/src/settings.js b/src/settings.js index 110cc246..cf329568 100644 --- a/src/settings.js +++ b/src/settings.js @@ -79,7 +79,7 @@ var PRECISE_I64_MATH = 1; // If enabled, i64 addition etc. is emulated - which i // Note that we do not catch 32-bit multiplication by default (which must be done in // 64 bits for high values for full precision) - you must manually set PRECISE_I32_MUL // for that. -var PRECISE_I32_MUL = 1; // If enabled, i64 math is done in i32 multiplication. This is necessary if the values +var PRECISE_I32_MUL = 0; // If enabled, i64 math is done in i32 multiplication. This is necessary if the values // exceed the JS double-integer limit of ~52 bits. This option can normally be disabled // because generally i32 multiplication works ok without it, and enabling it has a big // impact on performance. diff --git a/tools/shared.py b/tools/shared.py index 57541077..672a1a18 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -413,7 +413,6 @@ class Settings: if opt_level >= 1: Settings.ASSERTIONS = 0 Settings.DISABLE_EXCEPTION_CATCHING = 1 - Settings.PRECISE_I32_MUL = 0 if opt_level >= 2: Settings.RELOOP = 1 if opt_level >= 3: |