× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: compiler natural boundary alignment
  • From: "Larry Loen" <lwloen@xxxxxxxxxx>
  • Date: Thu, 14 Jun 2001 09:49:00 -0500
  • Importance: Normal


>Why does ILE align an integer variable on an
>address that is a multiple of
>the integer's length?

Because, for the foreseeable future, any implementation of the PowerPC
architecture will run faster that way.  Faster enough to be worth the
trouble.

This is not entirely specific to PowerPC architecture, either.  Trends in
CPU design and the differential of main storage speed vs CPU speed (storage
improving slowler than CPU) practically gurantee this effect across all
architectures.  If anything, the performance difference between naturally
aligned and unaligned data fetches are getting greater over time.

I believe you can override this behavior (in C the _packed directive ahead
of a structure somehow does this -- don't know how this is expressed in ILE
proper).  But, from a performance point of view, one should have a good
reason to do unaligned references.

For what it is worth, portable C/C++ code tends to expect or even require
"natural" alignment of the data.  Thus, nowadays, natural alignment is the
"default" expectation and has been for many years.


Larry W. Loen  -   Senior Java and iSeries Performance Analyst
                          Dept HP4, Rochester MN


+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.