From 599e417f0ed352b71148b51ee87943a28a64b4ea Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 2 Apr 2018 15:08:55 +1000 Subject: [PATCH] 16-bit limbs are faster than 32-bit on ESP8266 --- libraries/Crypto/BigNumberUtil.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/Crypto/BigNumberUtil.h b/libraries/Crypto/BigNumberUtil.h index 28d83e7f..2212cbb1 100644 --- a/libraries/Crypto/BigNumberUtil.h +++ b/libraries/Crypto/BigNumberUtil.h @@ -27,8 +27,9 @@ #include // Define exactly one of these to 1 to set the size of the basic limb type. -#if defined(__AVR__) +#if defined(__AVR__) || defined(ESP8266) // 16-bit limbs seem to give the best performance on 8-bit AVR micros. +// They also seem to give better performance on ESP8266 as well. #define BIGNUMBER_LIMB_8BIT 0 #define BIGNUMBER_LIMB_16BIT 1 #define BIGNUMBER_LIMB_32BIT 0