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 16:57:23 +0200

This patch is for array-for-each. Only the first argument.

Before:

scheme@(guile-user)> (define a (make-array 1 1000000 10))
scheme@(guile-user)> ,time (let ((x 0)) (array-for-each (lambda (a) (set! x (+ 
a x))) a) x)
$8 = 10000000
;; 0.621887s real time, 0.620181s run time.  0.000000s spent in GC.

After:

scheme@(guile-user)> (define a (make-array 1 1000000 10))
scheme@(guile-user)> ,time (let ((x 0)) (array-for-each (lambda (a) (set! x (+ 
a x))) a) x)
$2 = 10000000
;; 0.529748s real time, 0.528301s run time.  0.000000s spent in GC.

Regards,
        
        Daniel

Attachment: 0007-Remove-double-indirection-for-1st-arg-of-array-for-e.patch
Description: Binary data



reply via email to

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