espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.77k stars 744 forks source link

Util Timer enhancements #1444

Open gfwilliams opened 6 years ago

gfwilliams commented 6 years ago
wilberforce commented 6 years ago

Is it worth benchmarking the 32 bit vs 64 bit for point 1 to see what the real gains are? I'm sure this will be different for each platform too.

gfwilliams commented 6 years ago

Is it worth benchmarking the 32 bit vs 64 bit

Yes, definitely. My plan is to toggle a pin on IRQ entry and exit and look at it with an oscilloscope. The reason I suggest it was when I was doing things a while back I did exactly that and felt that the IRQ was taking too long to complete.

gfwilliams commented 4 years ago

Done some work on this - as you note the hit from 64->32 math isn't huge. There hasn't been a massive improvement.

The one that hurt was recurring timers which used what ended up being a 64 bit divide, so it's nice to get rid of that.