[R-SIG-Mac] performance difference GUI vs. terminal

stefano iacus stefano.iacus at unimi.it
Thu May 19 17:50:45 CEST 2005


Simon,
could we add a pref checkbox? Like "Give cpu time to other processes 
during R calculations" yes/no which disables/enables R_ProcessEvent 
calls in eval().


stefano

On 19/mag/05, at 16:00, Simon Urbanek wrote:

> Joerg,
>
> thanks you for the report.
>
> On May 19, 2005, at 7:58 AM, joerg van den hoff wrote:
>
>> I upgraded today from 2.0 to 2.1.0a on my G5.
>> I'm using still mostly the command line interface to R, but of course
>> the GUI is attractive, too, and better access to the quartz() device 
>> is a big plus (I would of course say a BIG thank you to the people 
>> who are engaged in this).
>>
>> but (as I already noted  under 2.0) there is a rather big difference 
>> in performance when initiating the same calculations in the GUI and 
>> the terminal, respectively.
>
> You are right. Closer look at the issue using your example reveals:
>
> in the GUI (2.1.0a release):
> > system.time({ sum <- 0; for (i in 1:1000000) sum <- sum+i })
> [1]  5.50  1.34 10.41  0.00  0.00
>
> console:
> > system.time({ sum <- 0; for (i in 1:1000000) sum <- sum+i })
> [1] 3.00 0.06 3.35 0.00 0.00
>
> As you can see the CPU running the GUI is not spent in R but somewhere 
> else. Basically it gives other applications and/or system too much 
> time (the disk use you mentioned is simply some other application than 
> R). I have now changed the GUI such that it won't call the event loop 
> too often. The timings improved indeed:
>
> GUI (r1545):
> > system.time({ sum <- 0; for (i in 1:1000000) sum <- sum+i })
> [1] 3.15 0.09 3.52 0.00 0.00
>
> It's still slightly slower, because I'm using single-CPU machine and 
> it has to handle user events, but the difference it not as big. Please 
> fetch tonight's nightly build (1545) to get this speed up and tell me 
> whether it works for you.
>
> Cheers,
> Simon
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list