all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: tomas@tuxteam.de
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] use tail pointer for LOOP
Date: Thu, 17 Jun 2010 17:16:23 +0200	[thread overview]
Message-ID: <87vd9h6660.fsf@ambire.localdomain> (raw)
In-Reply-To: <20100617140501.GA29261@tomas> (tomas@tuxteam.de's message of "Thu, 17 Jun 2010 16:05:01 +0200")

() tomas@tuxteam.de
() Thu, 17 Jun 2010 16:05:01 +0200

   Here you go:

     copy1: (1.115929 5 0.7795429999999997)
     copy2: (1.210733 5 0.8172469999999996)
     copy3: (1.2816079999999999 5 0.8502519999999998)
     copy4: (1.295846 5 0.9325959999999993)

   (I did implement the garbage-collect-before-each-run as you suggested in
   your other mail: this can be nicely seen in the constant number "5"
   above).

   I won't spam this list with the modified source (unless someone clamours
   for it, that is).

   So without the GC the gap narrows significantly. But still: reverse's
   the king of the hill.

   OTOH, the differences in GC times start to be a considerable fraction of
   the whole difference, so I might be measuring noise anyway.

You can test this hypothesis (or rather the sensitivity of the system to this
effect) by permuting the order.  E.g., what if you do ‘copy1’ last?

   Seems we can't beat an old Lisp idiom (my guess is that Lisp is alien
   technology, but hey).

Don't give up, yet.

Another idea is to 10x the input length.

thi



  reply	other threads:[~2010-06-17 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 21:56 O(N^2) behavior in LOOP Daniel Colascione
2010-05-29 22:06 ` Daniel Colascione
2010-05-29 22:14   ` Lennart Borgman
2010-05-29 22:35   ` Geoff Gole
2010-05-29 23:58     ` [PATCH] use tail pointer for LOOP (Was: Re: O(N^2) behavior in LOOP) Daniel Colascione
2010-05-30  0:45       ` Ken Raeburn
2010-05-30  0:49         ` Daniel Colascione
2010-06-16 17:44           ` tomas
2010-06-16 18:10             ` [PATCH] use tail pointer for LOOP David Kastrup
2010-06-17  5:10               ` tomas
2010-06-17  7:18                 ` Thien-Thi Nguyen
2010-06-17  9:22                   ` tomas
2010-06-17 10:03                     ` Thien-Thi Nguyen
2010-06-17 14:05                       ` tomas
2010-06-17 15:16                         ` Thien-Thi Nguyen [this message]
2010-06-17 10:12                     ` Thien-Thi Nguyen
2010-06-17 20:48                 ` Stefan Monnier
2010-06-18  7:07                   ` David Kastrup
2010-06-18 13:40                     ` Stefan Monnier
2010-05-30 17:05       ` Štěpán Němec
2010-05-30 17:09         ` Daniel Colascione

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=87vd9h6660.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=emacs-devel@gnu.org \
    --cc=tomas@tuxteam.de \
    /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.