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


From: Daniel Llorens
Subject: Re: array-copy! is slow & array-map.c
Date: Wed, 3 Apr 2013 16:50:55 +0200

On Apr 3, 2013, at 14:50, Ludovic Courtès wrote:

> Daniel Llorens <address@hidden> skribis:
> 
>> These two patches do it for array-map!.
>> 
>> The first patch avoids cons for the 1-argument case. The second patch 
>> removes the double indirection for the first two arguments in every case. 
>> Since there's some work done inside the loop, the improvement is smaller 
>> than for array-copy! or array-fill!.
> 
> Could you provide a patch that adds test cases for array-map! in
> arrays.test?  I’d like to have a minimal safety net before applying
> these.
> 
> TIA,  :-)
> Ludo’.

The patches pass the tests in ramap.test. These include different types and 
non-compact arrays. I can add more if you think these aren't sufficient.

Here is the new patch set on top of the one you've already applied. The patch 
for array-fill! includes a test for non-compact arrays that I didn't see in 
arrays.test. 

Regards,

        Daniel

Attachment: 0001-Deprecate-dead-code-in-array-map.c.patch
Description: Binary data

Attachment: 0002-Avoid-per-element-cons-for-1-arg-case-of-array-map.patch
Description: Binary data

Attachment: 0003-Remove-double-indirection-in-array-map-with-2-args.patch
Description: Binary data

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

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


reply via email to

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