emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Byte-compiling and lexical scoping for performance


From: Clément Pit--Claudel
Subject: Byte-compiling and lexical scoping for performance
Date: Mon, 12 Dec 2016 09:51:07 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Hi emacs-devel,

The article at http://nullprogram.com/blog/2016/12/11/ is an interesting read:

> Faster Elfeed Search Through JIT Byte-code Compilation
> 
> Today I pushed an update for Elfeed that doubles the speed of the 
> search filter in the worse case. […]
> 
> There’s one last thing to watch out for. Everything so far has been 
> compiled with lexical scope. […]
> 
> Lexical scope has better performance. Here are all the benchmarks
> with the default dynamic scope: […]
> 
> It halves the performance […] Under dynamic scope, local variables
> use the varref opcode — a global variable lookup — instead of the
> stack-ref opcode — a simple array index.

(sending this here and not to -discuss because IIRC we have few examples of 
lexical binding being used for performance — json.el is the only one I remember)

Cheers,
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]