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

classic Classic list List threaded Threaded
3 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Dear co-scilabers,

The bug 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.

Thank you.
Samuel


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unusable cat() rewritten. Call for reviewers

Le 10/08/2017 à 19:55, Samuel Gougeon a écrit :

Dear co-scilabers,

The bug 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


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Claus Futtrup Claus Futtrup
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unusable cat() rewritten. Call for reviewers

Hi Samuel, et al.

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

Yes. Absolutely. Sorry that I don't know how to help verify the code.

/Claus

On 10-08-2017 20:03, Samuel Gougeon wrote:
Le 10/08/2017 à 19:55, Samuel Gougeon a écrit :

Dear co-scilabers,

The bug 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



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users



_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Loading...