KisIterator, quantum and pixels
boud at valdyas.org
Mon Jul 5 15:44:30 CEST 2004
On Monday 05 July 2004 15:35, Roger Larsson wrote:
> On Monday 05 July 2004 14.51, Boudewijn Rempt wrote:
> > On Monday 05 July 2004 14:38, Boudewijn Rempt wrote:
> > > On Monday 05 July 2004 14:13, Casper Boemann wrote:
> > > > image requires efficient access,with small loops that remains in
> > > > cache. Calling a function for every pixel is simply to much overhead.
> > > > Sad but true. This is why we need iterators.
> > >
> > > Mwah. I'm not convinced... (Don't take that too serious -- it's just
> > > that I really, really hate premature optimization, especially if it
> > > means complicating an interface. But I guess I'll just have to get rid
> > > of my Java prejudices.)
> > Oh, what I don't understand is this -- isn't every iteration of an
> > iterator a function call, too?
> Yes, in both cases you can make sure that all functions needed are inline.
> Then the compiler can do all sorts of optimizations - like moving constant
> stuff out of the loop.
Which means, I take it, that there's not much reason to prefer one thing or
Boudewijn Rempt | http://www.valdyas.org/fading/index.cgi
More information about the kimageshop