all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: IRIE Shinsuke <irieshinsuke@yahoo.co.jp>
To: Glenn Morris <rgm@gnu.org>
Cc: Juanma Barranquero <lekktu@gmail.com>, 7174@debbugs.gnu.org
Subject: bug#7174: 23.2; `last' can be made faster by using `length'
Date: Thu, 14 Oct 2010 13:35:41 +0900	[thread overview]
Message-ID: <87mxqhs86a.wl%irieshinsuke@yahoo.co.jp> (raw)
In-Reply-To: <notykpllg0.fsf@fencepost.gnu.org>

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





      parent reply	other threads:[~2010-10-14  4:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08  1:31 bug#7174: 23.2; `last' can be made faster by using `length' IRIE Shinsuke
2010-10-13  3:30 ` Glenn Morris
2010-10-13 22:25   ` Juanma Barranquero
2010-10-13 22:48     ` Glenn Morris
2010-10-13 22:52       ` Juanma Barranquero
2010-10-13 22:56         ` Glenn Morris
2010-10-13 23:16           ` Juanma Barranquero
2010-10-13 23:29             ` Glenn Morris
2010-10-13 23:44               ` Juanma Barranquero
2010-10-13 23:29             ` IRIE Shinsuke
2010-10-13 23:00     ` IRIE Shinsuke
2010-10-13 23:30       ` Glenn Morris
2010-10-13 23:45         ` Juanma Barranquero
2010-10-14  4:35         ` IRIE Shinsuke [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mxqhs86a.wl%irieshinsuke@yahoo.co.jp \
    --to=irieshinsuke@yahoo.co.jp \
    --cc=7174@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.