Path: utzoo!mnetor!uunet!husc6!bloom-beacon!mit-eddie!bbn!rochester!pt.cs.cmu.edu!andrew.cmu.edu!kw1r+
From: kw1r+@andrew.cmu.edu (Kevin Whitley)
Newsgroups: comp.sys.mac.programmer
Subject: Quickdraw speed
Message-ID: 
Date: 9 May 88 14:32:10 GMT
Organization: Carnegie Mellon
Lines: 25

I've been working on a program that draws a lot of lines to the screen (using
LineTo & friends) and now I'm trying to speed it up.  I wrote a little test
program in Lightspeed C whose relevant part is:

ii = 10000;
timer = TickCount();
while (--ii >= 0)
        {
        MoveTo(0,0);
        LineTo(1,0);
        LineTo(2,0);
        }
timer = TickCount() - timer;

When I execute this fragment with varying numbers of LineTo calls I get the
result that a call to LineTo which draws 1 pixel on a horizontal line costs
around 0.4 milliseconds on a Mac II, about twice that much on an SE.  Am I
doing something wrong?  This seems MUCH too slow.  My non-Mac colleagues have
been derisive about this speed.  What can I do to speed it up?

Thanks,

Kevin Whitley
Carnegie-Mellon University
kw1r@andrew.cmu.edu