I'm sure it would work, probably speed things up, :) and introduce new ways to 
trigger bugs?

On February 19, 2021 10:55:07 PM HST, Paul Womack wrote:
> It's hard to see how improving locality of access wouldn't help,
> regardless of OS details.
> 
>    BugBear
> 
> On Sat, 20 Feb 2021 at 04:26, David W. Jones wrote:
> 
> > At which point perhaps, it seems to me, things become a maze of
> > OS-specific optimizations of how the app handles pseudo-tiles... but
> > I understand the problems of thrashing.
> >
> > On 2/12/21 6:49 AM, Paul Womack wrote:
> > > True as far as it goes.
> > >
> > > An OS will manage virtual memory, swapping data between RAM and
> Disc as
> > > needed, normally in pages of some fixed size.
> > >
> > > However, if the application is "naive", some worst case behaviour
> can
> > > emerge. Imagine an application that routinely access the first
> byte of a
> > > page,
> > > and then accessed the first byte of every other page before
> re-accessing
> > > the first byte of the first page again.
> > > The application is not addressing many BYTES, but it will thrash
> the
> > > virtual memory badly. A typical image rotate will have this
> behaviour on
> > > either source of destination.
> > >
> > > What you're aiming for is locality of accesses, where multiple
> accesses
> > > all fall within a page. For raster graphics this can be achieved
> by
> > > accessing data in a tiled way, so that adjacent pixels in both X
> and Y
> > > are "near". This can be done WITHOUT a tiled virtual memory
> system, you
> > > just need to access the data in a tiled order.
> > >
> > > This can be done by finding the pseudo-tile T a (x,y) coord is in
> > > (simple divide X, Y by the the tile size), calculate the tile base
> > > address of the tile T (T * tile_bytes) and then work out the
> offset of
> > > the data from the tile base (x and y modulo tile side, then
> multiply the
> > > new Y by tile side).
> > >
> > > I has a fancy 2D Object browser on SunOs that was thrashing, and
> by
> > > simply implementing "address_of_object()" as outlined above, the
> memory
> > > behaviour was immaculate.
> > >
> > >     BugBear




-- 
David W. Jones
gnomeno...@gmail.com
wandering the landscape of god
http://dancingtreefrog.com

Sent from my Android device with F/LOSS K-9 Mail.

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to hugin-ptx+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/C125055B-3CD4-451C-A126-E5E38DAB4515%40gmail.com.

Reply via email to