guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: array-copy! is slow & array-map.c (was: Extremly slow for format & s


From: Daniel Llorens
Subject: Re: array-copy! is slow & array-map.c (was: Extremly slow for format & string-join)
Date: Tue, 2 Apr 2013 12:19:49 +0200

On Apr 1, 2013, at 19:15, Daniel Llorens wrote:

> Third, none of the above are causing the slowness of array-copy!. I noticed 
> that there's a double indirection in racp(). The second patch removes it. 
> Actually this double indirection goes on all over array-map.c and I don't 
> understand why it's needed...

This patch does the same for array-fill!. The improvement is similar.

Before:

scheme@(guile-user)> (define a (make-typed-array 'a *unspecified* 1000000 10))
scheme@(guile-user)> ,time (array-fill! a #\v)
;; 1.211000s real time, 1.200000s run time.  0.000000s spent in GC.

After:

scheme@(guile-user)> ,time (array-fill! a #\v)
;; 0.855000s real time, 0.850000s run time.  0.000000s spent in GC.

Regards

        Daniel


Attachment: 0004-Remove-double-indirection-in-array-fill.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]