GNU bug report logs - #7174
23.2; `last' can be made faster by using `length'

Previous Next

Package: emacs;

Reported by: IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>

Date: Fri, 8 Oct 2010 01:30:03 UTC

Severity: wishlist

Tags: patch

Found in version 23.2

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #48 received at 7174 <at> debbugs.gnu.org (full text, mbox):

From: IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>,
	IRIE Shinsuke <irieshinsuke <at> yahoo.co.jp>, 7174 <at> debbugs.gnu.org
Subject: Re: bug#7174: 23.2; `last' can be made faster by using `length'
Date: Thu, 14 Oct 2010 13:35:41 +0900
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




This bug report was last modified 14 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.