On Tue, Feb 7, 2017 at 12:00 AM, Stefan Monnier wrote: >> The following patch adds support for a new op `switch` to the Emacs >> bytecode VM and compiler. > > I guess the motivation is to speed up some code. > Did you make any measurements to see what kind of effect it has? The attached benchmark code took 9.409541956 seconds when compiled without switch, and 0.20807168799999998 seconds (97% speedup) when compiled with switch. It generates a cond clause with a thousand clauses comparing a variable with random integer values, with the last clause containing the actual value. However, since it's a synthetic benchmark, real world code should be better indicator of performance improvement. -- Vibhav Pant vibhavp@gmail.com