Re: Switch, Speed and Euphoria
- Posted by mattlewis (admin) Jul 25, 2008
- 846 views
I just wanted to say that Matt has just committed a new revision that now uses a switch in the do_exec() procedure and Euphoria 4.0 now has a 5-8% speed increase overall! 5-8% may not sound like much to many, but consider how fast Euphoria is already. 5-8% is a huge improvement.
Thanks Matt!
Ug! I must retract my statement... I miss understood .. This is for execute.e which only affects the euphoria-in-euphoria backend. It is not used for the translator or interpreter.
Sorry guys, but hey, Euphoria is still fast! (trying to recoup the thread)
Right. What it shows is still of general use. The old way used a sequence of routine_ids to figure out which proc to call next. But assuming that your conditions are all integers, and you only ever feed integers into the switch statement, it will be faster than the sequence of routine_ids.
Matt