Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!stjhmc!p88.f15.n300.z1.fidonet.org!Lawson.English From: Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) Newsgroups: comp.sys.mac.programmer Subject: Pascal deficiency? Message-ID: <32785.276F7FAE@stjhmc.fidonet.org> Date: 19 Dec 90 14:50:22 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:300/15.88 - Tucson Apple Core, Tucson AZ Lines: 48 Anthony Berno writes in a message to All AB> Either there is no way to do a quick increment in Pascal, or AB> I'm missing something in my knowledge, or I'm wrong about the AB> speed difference between things like ++(variable) and (variable):=(variable)+1- AB> If your compiler is bad at optimization (and all Apple compilers are notoriously bad), then it won't recognize the special case of inc x for x := x+1; Of course, as most Apple products are slowed down by the trap dispatcher, thrid-party optimization is pretty much a waste unless a substantial amount of time is spent in arithmatic or searching/sorting. Consider: the average graphics program on a Plus spends 20% of its time in the trap dispatcher. The average '020 machine spends 60% of its time there. I don't know how much time is spent there in the 030 machines but I would not be surprised if as much as 75-80% of the time is spent there. This assumes that SANE is being used instead of the '881/882. Regions are another area where graphics slows to a crawl: if you are sure that your program will never write outside of the screen (you're doing a copybits for instance), set your clip region to a rectangle, rather than let the cute rounded corners of the screen be used. This can speed up full-screen drawing by quite a bit. My first programming job on the Mac was providing the software background/support for software optimization of the accellerator/graphics board. Some 0f the stuff in the 128k ROMS was pretty scary we found. Lawson -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!300!15.88!Lawson.English Internet: Lawson.English@p88.f15.n300.z1.fidonet.org