Speedy for Espruino #1269
Replies: 3 comments
-
Posted at 2018-12-12 by @gfwilliams Is this significantly faster than something like
I'd have hoped that they would be quite similar. If not, it's probably something I should look at performance-wise :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-12-30 by JumJum The idea behind speedy is slightly different.
I would not say, this is standard Javascript ;-), it could be helpful, but is it worth it ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-01-07 by @gfwilliams Ahh, ok - so being able to execute an array of functions one after the other? Something like this is actually very close to doing exactly what you want:
However because it runs through once to count the elements it actually ends up calling everything twice. I guess a But does anyone else have any thoughts about whether this would get used? Personally it feels like a very niche thing and I'm not too sure of the uses. I mean, if
would be more readable and significantly faster. To be honest the best thing would be to just make the interpreter itself able to 'fast path' simple JavaScript functions so they executed extremely quickly - then we wouldn't need a lot of this messing around. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-12-12 by JumJum
During my test with a driver for LED panel, @gfwilliams added a very nice speed up function.
This looks very good, and I gave it a chance to become a seperate function. In first test, it even speeds up bit.
@gfwilliams, usually you have some good ideas. Could this be a starting point for a kind of prebind, not saying precompile ?
Beta Was this translation helpful? Give feedback.
All reactions