[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables
From: |
Vibhav Pant |
Subject: |
Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables. |
Date: |
Tue, 7 Feb 2017 19:20:35 +0530 |
On Tue, Feb 7, 2017 at 12:00 AM, Stefan Monnier
<address@hidden> 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
address@hidden
switch-benchmark.el
Description: Text Data
Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables.,
Vibhav Pant <=
- Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Clément Pit-Claudel, 2017/02/07
- Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Vibhav Pant, 2017/02/08
- Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Vibhav Pant, 2017/02/08
- Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Vibhav Pant, 2017/02/08
- Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Stefan Monnier, 2017/02/09
Re: [PATCH]: Add new bytecode op `switch' for implementing branch tables., Eli Zaretskii, 2017/02/08
Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.], Tino Calancha, 2017/02/22
Re: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.], Richard Copley, 2017/02/23
Re: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.], Tino Calancha, 2017/02/23
Re: Compiled code in Emacs-26 will fail in Emacs-25 if use pcase [was: Add new bytecode op `switch' for implementing branch tables.], Stefan Monnier, 2017/02/23