GNU bug report logs - #17049
[PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST

Previous Next

Package: guile;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Thu, 20 Mar 2014 11:24:01 UTC

Severity: wishlist

Tags: notabug, patch

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: David Kastrup <dak <at> gnu.org>
To: Andy Wingo <wingo <at> pobox.com>
Cc: 17049 <at> debbugs.gnu.org
Subject: bug#17049: [PATCH] Make reverse! forego the cost of SCM_VALIDATE_LIST
Date: Fri, 21 Mar 2014 18:44:07 +0100
[Message part 1 (text/plain, inline)]
Andy Wingo <wingo <at> pobox.com> writes:

> Hi,
>
> Thanks for the patch.  What is its performance impact for your use case?

Here is an artificial use case (I make care to get my list scattered
over memory, assuming that sort! keeps the cells around).

[zoppo.scm (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
The output for my version first and the default version afterwards is

#<time type: time-duration nanosecond: 449629000 second: 8>dak <at> lola:/usr/local/tmp/guile$ meta/guile /tmp/zoppo.scm 
#<time type: time-duration nanosecond: 898802000 second: 15>dak <at> lola:/usr/local/tmp/guile$ 

So it's a bit better than my 7:4 estimate (rather a factor of 1.88),
probably because I forgot that the CPU does not have to wait for the
write cycle to complete for continuing.

Now that's a somewhat artificial benchmark, but still: almost a factor
of 2 for the operation itself is pretty good.

-- 
David Kastrup

This bug report was last modified 11 years and 57 days ago.

Previous Next


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