Re: Optimizing structure layout

David L Moore <dlmoore@ix.netcom.com>
27 Mar 1997 13:37:58 -0500

          From comp.compilers

Related articles
Optimizing structure layout erik.schnetter@student.uni-tuebingen.de (1997-03-21)
Re: Optimizing structure layout dolby@cs.uiuc.edu (Julian Dolby) (1997-03-22)
Re: Optimizing structure layout fjh@mundook.cs.mu.OZ.AU (1997-03-22)
Re: Optimizing structure layout cdg@nullstone.com (Christopher Glaeser) (1997-03-22)
Re: Optimizing structure layout meissner@cygnus.com (Michael Meissner) (1997-03-27)
Re: Optimizing structure layout dlmoore@ix.netcom.com (David L Moore) (1997-03-27)
Re: Optimizing structure layout tl@funcom.com (1997-03-31)
Re: Optimizing structure layout pieper@zko.dec.com (John Pieper) (1997-03-31)
Re: Optimizing structure layout bonnardv@pratique.fr (Valentin Bonnard) (1997-03-31)
| List of all articles for this month |
From: David L Moore <dlmoore@ix.netcom.com>
Newsgroups: comp.compilers
Date: 27 Mar 1997 13:37:58 -0500
Organization: Netcom
References: 97-03-130 97-03-138
Keywords: storage, optimize, parallel

Christopher Glaeser wrote:
> Is your question limited to C-style struct data structures, or all data
> structures, including arrays?
>
> Regarding array data structures, there are compilers that reshape arrays
> for optimal memory and cache alignment to improve the performance of
> algorithms such as matrix multiply.


One optimization which can have huge effects on caching is splitting
arrays of structures into separate arrays for each element. This works
when only a few elements from each struct are accessed in any given
loop.


Its also yet another example, in the general case, of ye-old graph
partitioning problem which seems to pop up all over the place. (ie,
given a graph with flows, partition the graph so as to minimize the
flows between the sub-graphs)


This optimization is well known, but has anyone actually ever
implemented it in a real compiler?
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.