[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Avoid using / in xsubstring and string-xco
Re: [Chicken-hackers] [PATCH] Avoid using / in xsubstring and string-xcopy!, since srfi-13 is compiled with (declare (fixnum))
Fri, 29 Jun 2012 20:49:49 +0200
On Thu, Jun 28, 2012 at 10:25:11AM -0400, Mario Domenech Goulart wrote:
> The attached patch contains a fix to #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...)
"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