Martin Maechler
1997-Jul-03 15:54 UTC
R-alpha: plot( pch = <character> ) is slow.. -- why ? --
Can anyone explain this to us :> unlist(version)platform arch os "sparc-sun-solaris2.5" "sparc" "solaris2.5" system status status.rev "sparc, solaris2.5" "Beta" "0" major minor year "0" "49" "1997" language "R" # (The following is using x11() and an Ultrasparc I. # You should decrease from '20000' if you have a slower machine):> x <- runif(20000)> for(i in 1:10) print(unix.time(plot(x)))[1] 1.66 0.04 3.00 0.00 0.00 [1] 1.33 0.04 2.00 0.00 0.00 [1] 1.68 0.04 3.00 0.00 0.00 [1] 1.40 0.05 2.00 0.00 0.00 [1] 1.67 0.06 2.00 0.00 0.00 [1] 1.44 0.05 3.00 0.00 0.00 [1] 1.68 0.06 2.00 0.00 0.00 [1] 1.38 0.04 2.00 0.00 0.00 [1] 1.66 0.06 2.00 0.00 0.00 [1] 1.41 0.06 3.00 0.00 0.00> > for(i in 1:10) print(unix.time(plot(x, pch='-')))[1] 4.76 3.25 21.00 0.00 0.00 [1] 4.29 2.51 20.00 0.00 0.00 [1] 4.46 2.95 20.00 0.00 0.00 [1] 4.75 2.95 21.00 0.00 0.00 [1] 5.42 2.99 23.00 0.00 0.00 [1] 4.73 3.14 23.00 0.00 0.00 [1] 4.93 3.00 23.00 0.00 0.00 [1] 4.62 3.02 22.00 0.00 0.00 [1] 4.76 3.06 23.00 0.00 0.00 [1] 4.62 2.82 22.00 0.00 0.00 ^^^^^ this tells you that the DRAWING PROCESS is the slow thing. it takes about 10 times longer... Why is x11 much faster in drawing pch=1 (a circle), than a simple "-" ? Is this X11's `fault' ? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Thomas Lumley
1997-Jul-03 16:28 UTC
R-alpha: plot( pch = <character> ) is slow.. -- why ? --
On Thu, 3 Jul 1997, Martin Maechler wrote:> # (The following is using x11() and an Ultrasparc I. > # You should decrease from '20000' if you have a slower machine): > > > x <- runif(20000) > > > for(i in 1:10) print(unix.time(plot(x))) > [1] 1.66 0.04 3.00 0.00 0.00 > > for(i in 1:10) print(unix.time(plot(x, pch='-'))) > [1] 4.76 3.25 21.00 0.00 0.00 > > Why is x11 much faster in drawing pch=1 (a circle), than a simple "-" ? > Is this X11's `fault' ?Same thing on a Pentium Pro running Linux and displaying on a Sparcstation 10. It looks like X11's fault: the graphics code directly calls the X11 functions in each case, however S-PLUS does not have this slowdown. I would have thought the explanation was that "-" requires plotting text and the circle is just graphics, however the square (pch=0) which is also a simple graphic is just as slow. Thomas Lumley ------------------------------------------------------+------ Biostatistics : "Never attribute to malice what : Uni of Washington : can be adequately explained by : Box 357232 : incompetence" - Hanlon's Razor : Seattle WA 98195-7232 : : ------------------------------------------------------------ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Possibly Parallel Threads
- lmer Error: Downdated X'X is not positive definite
- [ovirt-users] Re: Gluster problems, cluster performance issues
- Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
- Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
- help for segmented package