guile-devel
[Top][All Lists]
Advanced

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

Re: Elisp performance


From: Andy Wingo
Subject: Re: Elisp performance
Date: Tue, 04 Aug 2009 13:14:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux)

Hi Daniel,

On Fri 31 Jul 2009 17:14, Daniel Kraft <address@hidden> writes:

> Hi Ken,
>
> Ken Raeburn wrote:
>> On Jul 31, 2009, at 02:02, Daniel Kraft wrote:
>>>>> Iterative prime sieve, (length (find-primes-to 5000)):
>>>>>  Scheme: 0.42s
>>>>>  Elisp, no void checks, lexical let: 3.40s
>>>>>  Elisp, no void checks, dynamic let: 4.43s
>>>>>  Elisp, void checks, dynamic let: 5.12s
>>>>>  Elisp, void checks, lexical let: 4.06s
>>>> As Ken says, it would be good to see an Emacs timing too.
>>>
>>> I'd like to provide one, but have no idea how to do so...  I just
>>> managed to find out how to evaluate elisp code from a buffer, but it
>>> would be cool to get some elisp REPL if possible (maybe even without
>>> starting emacs itself and just from a shell?) -- and how to I time?
>>> As well as byte-compile and time then?
>>
> [...]
>
> Thanks for the emacs hints!  For the prime sieve, emacs itself takes
> about 1.89s (interpreted) and 0.32s (compiled).  So it's significantly
> faster than my elisp version at the moment, the reason might be the
> performance hit from the primitive calls already discussed (but I don't
> know).  And the compiled version is even faster than Guile runs the
> Scheme code.

Very interesting results! We'll work on the elisp, as noted in other
mails. The Scheme vs Emacs results are somewhat surprising, but that's
probably due to using set! instead of functional loops. Also, Guile's
compiler still needlessly allocates closures for loops. Perhaps I should
fix that this week.

Andy
-- 
http://wingolog.org/




reply via email to

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