public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@rabi.columbia.edu>
To: Peter Barada <pbarada@wavemark.com>
Cc: egcs@cygnus.com
Subject: Re: ridiculous amounts of padding
Date: Sun, 31 Jan 1999 23:58:00 -0000	[thread overview]
Message-ID: <199901121950.OAA15108@rabi.phys.columbia.edu> (raw)
In-Reply-To: <199901121833.NAA30076@hyper.wavemark.com>

On Tue, 12 Jan 1999 13:33:59 -0500, Peter Barada wrote:
>
>>The point behind the string alignments is not to improve cache behavior, but 
>to
>>provide the strings on aligned addresses for memcpy, strcpy and other routine
>s
>>that will examine the alignment at compile or runtime and possibly select a
>>more efficient loop if the alignment of the operands are suitable.
>
>Aligning the strings won't help if the size of the strings is small
>enough that the string code is forced to use brute force.
>
>So don't align strings if their length is below some small
>constant.  This will dramatically cut down on the wasted space as a
>percent of the total string size. 

The case I'm concerned about has many strings all of which are between 75
and 80 characters long.  Aligning them on 32 byte boundaries wastes an
average of 16 bytes per string.

Alignment for efficient copying is a win here, but wouldn't 8 byte alignment
suffice (to be able to use aligned 64 bit load/store instructions)?  I'm
pretty certain this is so for x86, not as sure for other platforms.

zw

  parent reply	other threads:[~1999-01-31 23:58 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-31 23:58 Zack Weinberg
1999-01-31 23:58 ` Joern Rennecke
1999-01-31 23:58   ` Jeffrey A Law
1999-01-31 23:58     ` Joern Rennecke
1999-01-31 23:58       ` Jeffrey A Law
1999-01-31 23:58     ` Peter Barada
1999-01-31 23:58       ` Nick Ing-Simmons
1999-01-31 23:58         ` Joern Rennecke
1999-01-31 23:58           ` John Vickers
1999-01-31 23:58             ` Joern Rennecke
1999-01-31 23:58       ` Marc Espie
1999-01-31 23:58       ` Zack Weinberg [this message]
1999-01-31 23:58         ` Jeffrey A Law
1999-01-31 23:58           ` Zack Weinberg
1999-01-31 23:58             ` Jeffrey A Law
1999-01-31 23:58 ` Alfred Perlstein
  -- strict thread matches above, loose matches on Subject: below --
1999-02-01 17:28 N8TM
1999-02-28 22:53 ` N8TM
1999-01-31 23:58 N8TM
1999-01-31 23:58 ` Zack Weinberg
1999-01-31 23:58   ` Jeffrey A Law
1999-01-31 23:58 John Wehle
1999-01-31 23:58 ` Marc Espie
1999-01-31 23:58   ` Joe Buck
1999-01-31 23:58     ` Marc Espie
1999-01-31 23:58   ` Jeffrey A Law
1999-01-30 16:35     ` Marc Lehmann
1999-01-31 20:05       ` Jeffrey A Law
1999-02-01  8:07         ` Marc Lehmann
1999-02-28 22:53           ` Marc Lehmann
1999-01-31 23:58       ` Marc Lehmann
1999-01-31 23:58   ` David Edelsohn
1999-01-31 23:58     ` Joe Buck
1999-01-31 23:58       ` Gabriel Dos Reis
1999-01-31 23:58         ` Joe Buck
1999-01-31 23:58           ` Jeffrey A Law
1999-01-31 23:58 John Wehle

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=199901121950.OAA15108@rabi.phys.columbia.edu \
    --to=zack@rabi.columbia.edu \
    --cc=egcs@cygnus.com \
    --cc=pbarada@wavemark.com \
    /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).