[Scilab-users] unusable cat() rewritten. Call for reviewers

Samuel Gougeon sgougeon at free.fr
Thu Aug 10 20:03:17 CEST 2017


Le 10/08/2017 à 19:55, Samuel Gougeon a écrit :
>
> Dear co-scilabers,
>
> The bug 8297 <http://bugzilla.scilab.org/8297> reporting the 
> outstanding slowness of the cat() function was reported in 2010
> but lasts since cat() was introduced. As measured and commented in the 
> report, this
> slowness actually makes cat() almost unusable, except for small sized 
> arrays to be concatenated.
>
> For instance, after M = rand(500,500); cat(3,M,M) takes more than 11 
> days (yes)
> with Scilab 5.5.2, and roughly 4 hours with Scilab 6.0.0.
>
> So, everyone could imagine how much Scilab currently takes just to 
> build a standard
> 1000x1000 RGB image by stacking its 3  1000x1000 R,G,B layers using 
> cat(3,R,G,B).
> The current algorithm is exponential with respect to the array size...
>
> Before using GPU routines to process images, a much simpler thing can 
> be done
> to enable cat() for true life usages : rewritting it.
> This is what is done here: https://codereview.scilab.org/#/c/19278/
>
> Some rewievers are needed to make cat() truly available in Scilab 6.0.1.
> So, do not hesitate to contribute online.
>

To complete: This new implementation spends 0.25 s (instead of 4 hours) 
to execute

M = rand(500,500);
cat(3,M,M);

and 0.42 s to process

M = rand(1000,1000);
cat(3,M,M,M);

Doesn't it fit more to what could be expected?
SG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20170810/418d7b52/attachment.htm>


More information about the users mailing list