summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@unpythonic.net>2018-03-26 07:31:13 -0500
committerJeff Epler <jepler@gmail.com>2018-03-27 21:56:30 -0500
commitabec199c19fdbd9705bd803cd9b8b2910c21bd3a (patch)
treedc8dce1974b3903951f906803e6d25c3942d5eef
parent1eba5804434a8acc182c23aadf5b5a5dcbe901fa (diff)
Enable high-quality float hash
This appears to have a relatively small impact on flash usage but fixes some pathological slow behavior putting floats in dicts or sets. Closes: #704
-rw-r--r--ports/atmel-samd/mpconfigport.h1
-rw-r--r--ports/esp8266/mpconfigport.h1
-rw-r--r--ports/nrf/mpconfigport.h1
3 files changed, 3 insertions, 0 deletions
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index a5884b6ad..de8703943 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -64,6 +64,7 @@
#define MICROPY_PY_SYS (1)
#define MICROPY_PY_SYS_MAXSIZE (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
+#define MICROPY_FLOAT_HIGH_QUALITY_HASH (1)
#define MICROPY_STREAMS_NON_BLOCK (1)
// fatfs configuration used in ffconf.h
diff --git a/ports/esp8266/mpconfigport.h b/ports/esp8266/mpconfigport.h
index 8caecf759..616e9875c 100644
--- a/ports/esp8266/mpconfigport.h
+++ b/ports/esp8266/mpconfigport.h
@@ -91,6 +91,7 @@
#define MICROPY_CPYTHON_COMPAT (0)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
+#define MICROPY_FLOAT_HIGH_QUALITY_HASH (1)
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL)
#define MICROPY_WARNINGS (1)
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index e806c201f..45c82439b 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -47,6 +47,7 @@
//CP UPDATE: See mpconfigport.h for LONGINT implementation
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
+#define MICROPY_FLOAT_HIGH_QUALITY_HASH (1)
#define MICROPY_OPT_COMPUTED_GOTO (0)
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)