Performance Improvement for ESP8266 code#1530
Performance Improvement for ESP8266 code#1530revoxhere merged 2 commits intoduino-coin:masterfrom snakeye:master
Conversation
|
Nice job! Have you tested it also on other boards? I'll need to update Kolka to make it run correctly 😅 |
|
I do have only ESP01 here but the firmware does not fit the flash. Need to disable ArduinoOTA and WebServer first. |
|
By the way, using the |
|
While you're on it, could you check if maybe similar thing isn't happening in the ESP32 code? I believe it could go even faster if 8266 is capable of doing these numbers now. |
|
Surely will check ESP32 next. |
|
Added another commit with |
|
The ESP32 code seems to use hash conversion outside of the loop and |
What about using fmt on the esp32? |
|
It clearly makes sense :) |
|
Right, fixed the missing bracket. |
|
Almost all the users use the Arduino IDE, if you can't provide a easy, IDE native way to add the fmt library, maybe is best to remove it... |
|
Indeed, the fmt may be a bit too much, but the rest looks like it can be added for the future version. |
|
Good point. I'm not using Arduino IDE at all. How do people add the dependencies there, ArduinoJSON for example? |
|
Tools > Manage Libraries > search. There is a centralized directory of Arduino IDE ready libraries, another option is making the library code available on the Look at this, for an example of a library that can be dropped into that folder: https://github.com/me-no-dev/ESPAsyncWebServer See the |
|
On PlatformIO I just add the dependency in the .ini file - https://registry.platformio.org/libraries/fmtlib/fmt/installation and it is stored in a code. Arduino IDE creates to much hassle :( Okay, I'm fine to remove fmt then. |
|
I get an average of 25.38 kH/s, with peaks of 29.51kH/s. And OTA, webserver works on ESP-01S (1 meg of flash) Kolka is not happy 😁 (ignore the share number, had a few unrelated restarts) the difficulty change is very random... might revert back to 3.18 code to avoid getting flagged |
|
I've just tested with ESP-01 (512K flash) and fmt, the results are quite the same as ESP-12e: Could it be that PlatformIO gives some better optimizations over Arduino IDE? |
|
could be, likely has an updated gcc, but even details as the version of the nonos-sdk version ( 2.2.1+119 ), and/or using a higher bandwidth version of the LwIP stack can affect things... for me sometimes can be the difference between a 8.5kH/s and a 10.1 kH/s average on the regular code. |
|
Maybe there's an easier way to add {fmt}, if you have that code in a different branch in your repo, I can try this:
|

Performance improvement of the difficulty loop
Tested on ESP-12e board, the hash rate improved from ~10KH/s to ~30KH/s