Re: [Scilab-users] Logical zero
On 01.02.2016 17:43, Dang Ngoc Chan, Christophe wrote: Hello, De : Jan-Åge Langeland Envoyé : lundi 1 février 2016 14:41 I ran a little speed test with the different alternatives, I found the results surprising: These kind of tests are of course interesting, but I'm always suspicious because of the buffering. -- Christophe Dang Ngoc Chan Mechanical calculation engineer Well when I watch the CPU load during execution of this script (in Windows 7 and 10), I can clearly see that they work longer and harder for Scilab 6. The load distribution is a bit different, Scilab 5.5 loads one CPU to 100%, while Scilab 6 distributes the load more on 2-4 CPUs. Jan ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
Hello all, Yes, that's quiet strange results and we probably have a bug on that expression. Could you open a bug to track that issue please ? But more generally, on the Scilab5 vs Scilab6 performance, we (Calixte in fact) made some analysis pass for our JIT demo use-case and we may re-use it to speed-up the interpreter but this is not done yet. There is only "trivial" shortcuts for common use-cases and, of course, the 5.x version might be more "performant" as it contains more and more complex shortcuts. While micro-benchmarking Scilab 6, please keep also in mind that the Copy-On-Write mechanism on Scilab 6 speed up auto-magically function calls and we checked that on average Scilab 6 is sometimes slower sometimes speeder than Scilab 5 but in the same order of magnitude. If you found any other issue like this one, do not hesitate to open a bug. Scilab6 may probably fallback in the generic (and worst case) implementation instead of having either a shortcut or an analysis pass. -- Clément Le lundi 01 février 2016 à 14:56 +0100, Stéphane Mottelet a écrit : > BTY, I am worried about the Scilab 6.0 timing (3.3228213 seconds) of > > a(1:n,1:m)=%f; > > i.e. more than ten times slower than Scilab 5.5.1 (0.2964019 seconds). > > Does somebody have an explanation ? > > S. > > > Le 01/02/2016 14:40, Jan-Åge Langeland a écrit : > > I ran a little speed test with the different alternatives, I found the > > results surprising: > > > > Jan > > > > //script ftest.sce > > m=1 > > n=1 > > v=ver(); > > disp(v(1,1:2)); > > clear a; > > timer(); > > a = zeros(n, m) == 1; //best in Scilab 6.0.0 > > disp(timer()); > > clear a; > > timer(); > > a=zeros(n,m)>0; > > disp(timer()); > > clear a; > > timer(); > > a=%f(ones(n,m)); > > disp(timer()); > > clear a; > > timer(); > > a(1:n,1:m)=%f; //best in Scilab 5.5.1 > > disp(timer()); > > clear a; > > //end script ftest.sce > > > > > > -->exec('ftest.sce',-1) > > > > !Scilab Version: 5.5.1.1412169962 ! > > > > 1.482009500037543941 > > > > 1.37280880029805233 > > > > 0.530403399546722393 > > > > 0.296401899780135113 > > > > -->exec('ftest.sce',-1) > > > > !Scilab Version: 6.0.0.1447231131 ! > > > > 0.6708043 > > > > 1.3260085 > > > > 2.7300175 > > > > 3.3228213 > > > > > > > > ___ > > users mailing list > > users@lists.scilab.org > > http://lists.scilab.org/mailman/listinfo/users > > -- > Département de Génie Informatique > EA 4297 Transformations Intégrées de la Matière Renouvelable > Université de Technologie de Compiègne - CS 60319 > 60203 Compiègne cedex > ___ > users mailing list > users@lists.scilab.org > http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
[Scilab-users] Logical zero
Is there a Scilab equivalent for the false function in Matlab? I want to create a matrix of logical zeros. Is there any other way to do it. Shamika -- View this message in context: http://mailinglists.scilab.org/Logical-zero-tp4033361.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
Le 01/02/2016 09:10, shamikam a écrit : Is there a Scilab equivalent for the false function in Matlab? I want to create a matrix of logical zeros. Is there any other way to do it. Shamika -- View this message in context: http://mailinglists.scilab.org/Logical-zero-tp4033361.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Many ways, such as ~ones(n,m), zeros(n,m)>0, ... S. -- Département de Génie Informatique EA 4297 Transformations Intégrées de la Matière Renouvelable Université de Technologie de Compiègne - CS 60319 60203 Compiègne cedex ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
Le 01/02/2016 10:16, Tim Wescott a écrit : I believe that a = zeros(n, m) == 1 will do it, but it may not be either the best or the official way. An other solution is %f(ones(n,m)) Serge Sent from my Verizon Wireless 4G LTE smartphone Original message From: shamikam <shamika.i.n...@gmail.com> Date: 02/01/2016 12:10 AM (GMT-08:00) To: users@lists.scilab.org Subject: [Scilab-users] Logical zero Is there a Scilab equivalent for the false function in Matlab? I want to create a matrix of logical zeros. Is there any other way to do it. Shamika -- View this message in context: http://mailinglists.scilab.org/Logical-zero-tp4033361.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
I believe that a = zeros(n, m) == 1 will do it, but it may not be either the best or the official way. Sent from my Verizon Wireless 4G LTE smartphone Original message From: shamikam <shamika.i.n...@gmail.com> Date: 02/01/2016 12:10 AM (GMT-08:00) To: users@lists.scilab.org Subject: [Scilab-users] Logical zero Is there a Scilab equivalent for the false function in Matlab? I want to create a matrix of logical zeros. Is there any other way to do it. Shamika -- View this message in context: http://mailinglists.scilab.org/Logical-zero-tp4033361.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
BTY, I am worried about the Scilab 6.0 timing (3.3228213 seconds) of a(1:n,1:m)=%f; i.e. more than ten times slower than Scilab 5.5.1 (0.2964019 seconds). Does somebody have an explanation ? S. Le 01/02/2016 14:40, Jan-Åge Langeland a écrit : I ran a little speed test with the different alternatives, I found the results surprising: Jan //script ftest.sce m=1 n=1 v=ver(); disp(v(1,1:2)); clear a; timer(); a = zeros(n, m) == 1; //best in Scilab 6.0.0 disp(timer()); clear a; timer(); a=zeros(n,m)>0; disp(timer()); clear a; timer(); a=%f(ones(n,m)); disp(timer()); clear a; timer(); *a**(**1**:**n**,**1**:**m**)**=**%f**;* //best in Scilab 5.5.1 disp(timer()); clear a; //end script ftest.sce -->exec('ftest.sce',-1) !Scilab Version: 5.5.1.1412169962 ! 1.482009500037543941 1.37280880029805233 0.530403399546722393 0.296401899780135113 -->exec('ftest.sce',-1) !Scilab Version: 6.0.0.1447231131 ! 0.6708043 1.3260085 2.7300175 3.3228213 ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users -- Département de Génie Informatique EA 4297 Transformations Intégrées de la Matière Renouvelable Université de Technologie de Compiègne - CS 60319 60203 Compiègne cedex ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
I ran a little speed test with the different alternatives, I found the results surprising: Jan //script ftest.sce m=1 n=1 v=ver(); disp(v(1,1:2)); clear a; timer(); a = zeros(n, m) == 1; //best in Scilab 6.0.0 disp(timer()); clear a; timer(); a=zeros(n,m)>0; disp(timer()); clear a; timer(); a=%f(ones(n,m)); disp(timer()); clear a; timer(); a(1:n,1:m)=%f; //best in Scilab 5.5.1 disp(timer()); clear a; //end script ftest.sce -->exec('ftest.sce',-1) !Scilab Version: 5.5.1.1412169962 ! 1.482009500037543941 1.37280880029805233 0.530403399546722393 0.296401899780135113 -->exec('ftest.sce',-1) !Scilab Version: 6.0.0.1447231131 ! 0.6708043 1.3260085 2.7300175 3.3228213 ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
Hello, > De : Jan-Åge Langeland > Envoyé : lundi 1 février 2016 14:41 > > I ran a little speed test with the different alternatives, I found the > results surprising: These kind of tests are of course interesting, but I'm always suspicious because of the buffering. -- Christophe Dang Ngoc Chan Mechanical calculation engineer This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
I forgot to test a=~ones(n,m). I guess this is the overall winner (from Stéphane Mottelet): Scilab 5.5.1: 0.2964019 Scilab 6.0.0: 0.5616036 Jan ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] Logical zero
find below the results on my computer (Linux) for Scilab-5.5.2 and last nightly build Version de Scilab : 6.0.0.1454090908 Version de Scilab : 5.5.2.1427793548 zeros(n, m) == 1 11.788 1.416 zeros(n,m)>0 8.47 1.043 %f(ones(n,m)) 9.347 1.164 a(1:n,1:m)=%f 4.352 0.816 *The scilab6 times are quite high!* ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users