emacs-devel
[Top][All Lists]
Advanced

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

Re: Why does adding a useless copy-sequence and discarding the result ma


From: Eli Zaretskii
Subject: Re: Why does adding a useless copy-sequence and discarding the result make my ELisp 40 times faster?
Date: Sat, 25 Mar 2017 10:05:48 +0300

> From: Clément Pit-Claudel <address@hidden>
> Date: Sat, 25 Mar 2017 00:24:20 -0400
> 
> On 2017-03-25 00:06, Clément Pit-Claudel wrote:
> > * Why does running additional, supposedly useless code speed things up so 
> > much? (1)
> 
> Interestingly, it turns out that (copy-sequence) isn't needed: instead, it's 
> enough to use (sleep-for 0.000001) (or even (sleep-for 
> cl-least-positive-normalized-float)) to get the 40x speedup.

Because, if you don't sleep, the process is not yet running by the
time you get to process-send-string, and then Emacs waits for a much
longer time for it to become running?



reply via email to

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