admin wrote:Have we been able to keep the ESP8266 at 160Mhz constant or does it still fall back to 80Mhz due to some binary blob call? Richard.
Not sure. I have tried WiFi listing and it remained at 160 Mhz.
Fr4gg0r wrote:Wow, 4x times the speed.
Someone should port the interpreter from nodelua.
Can you also check how much free heap there is in nodelua?
After some more investigation, the speed increase seen in nodelua might have had to do with the way it handles variables.
In this thread, dvv recommended using local variables. Here is the code that he suggested testing:
do
local mode, write, OUTPUT = gpio.mode, gpio.write, gpio.OUTPUT
mode(2, OUTPUT)
for i = 1,10 do
write(2, 1)
write(2, 0)
end
end
Doing so gave the following results (CPU @ 80 Mhz in all cases):
~52 kHz on the nodelua 20150120 firmware (gpio pin = 4)
~51 kHz on the nodemcu 20150127 firmware (gpio pin = 4)
~63 kHz on the jrahlf 20150127 fork (gpio pin = 2)