bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7174: 23.2; `last' can be made faster by using `length'


From: IRIE Shinsuke
Subject: bug#7174: 23.2; `last' can be made faster by using `length'
Date: Thu, 14 Oct 2010 13:35:41 +0900
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj$(D+W(B) APEL/10.7 Emacs/23.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

At Wed, 13 Oct 2010 19:30:55 -0400,
Glenn Morris wrote:

> (I assume it is still faster than the original, BTW?)

I examined that.

The new `last' is still faster than the original even though it uses
`safe-length', except for particular cases as follows:

  (last nil 0)   (last '(foo) 0)   (last '(foo))

Here, '(foo) is a list of one element. In these cases, it's 2-5% slower.
If LIST has 1000 elements, 4-8 times faster.

IRIE Shinsuke





reply via email to

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