🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.image.processing
Article #305

Re: image processing loops

#305
From: Michael P. Jarreau
Date: Tue, 11 Aug 1992 20:00
16 lines
1508 bytes
I have been asked why this is so.  First of all, I meant to write
decrement rather than increment.

The speed increase comes from the fact that there is a single machine
instruction which is something to the effect of "decrement register
and jump to address xxx IF NOT ZERO" thus costing one machine cycle.

Other speed optimizations can be made by avoiding comparisons which 
contain expressions.  These expressions are re-evaluated at each
iteration of a loop without regard to whether any of the concerned
variables have changed.

I expect that this holds true with other processors, I just don't have
any recent experience on them.

Michael
Technical Details
Message-ID: <1992Aug11.200012.24819@vuse.vanderbilt.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!news.Vanderbilt.Edu!vuse.vanderbilt.edu!jarreau
References: <1992Aug10.221247.8016@cfa.harvard.edu> <1992Aug11.151146.11849@vuse.vanderbilt.edu> <Bsu0zo.6qC@acsu.buffalo.edu>

Show Full Headers
Complete Article Headers
Newsgroups: sci.image.processing
Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!news.Vanderbilt.Edu!vuse.vanderbilt.edu!jarreau
From: jarreau@vuse.vanderbilt.edu (Michael P. Jarreau)
Subject: Re: image processing loops
Message-ID: <1992Aug11.200012.24819@vuse.vanderbilt.edu>
Summary: A follow up 
Sender: news@vuse.vanderbilt.edu (News Manager)
Nntp-Posting-Host: ip1
Organization: Vanderbilt University School of Engineering, Nashville, TN, USA
   ... on Sun Sparcstations you will probably find that loops which
   begin at the last pixel of an image and increment to 0 will perform
   significantly faster than otherwise.
References: <1992Aug10.221247.8016@cfa.harvard.edu> <1992Aug11.151146.11849@vuse.vanderbilt.edu> <Bsu0zo.6qC@acsu.buffalo.edu>
Distribution: sci.image.processing
Date: Tue, 11 Aug 1992 20:00:12 GMT
Lines: 16