[Scilab-users] perfomnace decease (scilab 5.4.0-beta3)

michael.baudin at contrib.scilab.org michael.baudin at contrib.scilab.org
Sun Sep 2 20:10:30 CEST 2012


Hi,

My message does not explain the performance differences between
Scilab versions, but may solve your actual performance
problem.

It seems that your script has 3 nested loops to
perform the computation.
So, whatever the performance of Scilab, your script
will be slow.
And, indeed, 272 sec is quite slow...
What you may consider is to vectorize your code.

As an example of a fast 2D implementation for the
solution of a PDE, you may try the scibench
module from ATOMS:

http://atoms.scilab.org/toolboxes/scibench

Look at the scibench_poisson function, which
solves the Poisson equation.
You may find the code in the Source tab of :

http://forge.scilab.org/index.php/p/scibench/

The main trick here is to compute all the
matrix in just one statement, based on the
Kronecker product:

http://forge.scilab.org/index.php/p/scibench/source/tree/HEAD/macros/scibench_poissonA.sci

For iterative methods, we just need the A*u product, and
this is done here :

http://forge.scilab.org/index.php/p/scibench/source/tree/HEAD/macros/scibench_poissonAu.sci

The performance difference is huge, as shown here :

http://wiki.scilab.org/Solving%20Poisson%20PDE%20with%20Sparse%20Matrices

Best regards,

Michaël

Le 2012-09-01 14:18, kjubo a écrit :
> hello,
>
> im testing performance of scilab with my own file (heat transfer
> computation),
> which consist of for cycles and if conditions. i found that scilab
> 5.4(beta3) runs 60% slower than other scilab version. have you any
> explanation to this behavior?
> (im testing on the same hardware every time, windows OS)
> here are my results, attached exec file.
>
> thanks
>
> Jakub Kopáč
>
>
>
> results:
> //SCILAB BENCHMARK
> // heat transfer 2D
> //scilab 4.1.2 272sek
> //scilab 5.2.2 320sek
> //scilab 5.3.0-beta1 295sec
> //scilab 5.3.0-beta2 293sec
> //scilab 5.3.0-beta3 296sec
> //scilab 5.3.0-SSE3  286sec
> //scilab 5.3.1       302sec
> //scilab 5.3.2-64bit 265sec
> //scilab 5.4.0-beta3 483sec
>
> http://mailinglists.scilab.org/file/n4024765/bench_prestup_tepla.sce
> bench_prestup_tepla.sce
>
>
>
> --
> View this message in context:
> 
> http://mailinglists.scilab.org/perfomnace-decease-scilab-5-4-0-beta3-tp4024765.html
> Sent from the Scilab users - Mailing Lists Archives mailing list
> archive at Nabble.com.
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



More information about the users mailing list