[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Avoid using / in xsubstring and string-xco
From: |
Peter Bex |
Subject: |
Re: [Chicken-hackers] [PATCH] Avoid using / in xsubstring and string-xcopy!, since srfi-13 is compiled with (declare (fixnum)) |
Date: |
Fri, 29 Jun 2012 20:49:49 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Thu, Jun 28, 2012 at 10:25:11AM -0400, Mario Domenech Goulart wrote:
> Hi,
>
> The attached patch contains a fix to #869
> (https://bugs.call-cc.org/ticket/869).
>
> srfi-13.scm is compiled with (declare (fixnum)), but `xsubstring' and
> `string-xcopy!' use / in a cond clause as a shorter path to avoid
> calling `%multispan-repcopy!', which is more "expensive".
>
> The patch just removes that shorter path, so the fixnum declaration can
> be kept.
Excellent, I've pushed this, but I still think we should consider
pulling in the tests. Now we just have this fix without a regression
test, it might creep back in if we ever decide to rewrite parts of
SRFI-13 (as its performance really is suboptimal in general we probably
want to consider doing this some day...)
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth