Skip to content

R-alpha: plot( pch = <character> ) is slow.. -- why ? --

2 messages · Martin Maechler, Thomas Lumley

#
Can anyone explain this to us :
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):
[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
[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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
On Thu, 3 Jul 1997, Martin Maechler wrote:

            
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
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-