public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: michael@infortrend.com.tw
To: help-gcc@gnu.org
Subject: Forcing functions to be aligned on CPU cache line boundaries with GCC
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <Pine.LNX.3.96.1000106232103.22104C-100000@infortrend.com.tw> (raw)
Message-ID: <20000401000000.IwiD45MeuEF3XS2M3njGN4FnyoL8mqnAAu4e6QLvZhg@z> (raw)

Hi!

We are using GCC as our primary development environment for a PPC HW
environment. We've noted that shifting code one way or the other can cause
5-10% difference in performance. We suspect that this has to do with
alignment of functions. If it happens that most of the functions that
are called are based near the head of cache lines, then the cache hit rate
will probably increase and performance go up. I'm speculating that this
may be the cause of such a difference in performance, for I can not think
of any other reason why a shift in memory location of code of a few dwords
would cause such a substantial performance impact.

So here's the questing. Is there any way to force alignment of functions
on, say, a 32-byte boundary? If so, what command line option or pragma or
whatever should we use?

Thanks much for any help you can provide!

Regards,

Michael Schnapp
Infortrend Technology, Inc.
Taiwan
email: michael@infortrend.com.tw



             reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-06  7:10 michael [this message]
2000-04-01  0:00 ` michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.96.1000106232103.22104C-100000@infortrend.com.tw \
    --to=michael@infortrend.com.tw \
    --cc=help-gcc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).