Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Jun 2000 18:42:01 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Anatoly Vorobey <mellon@pobox.com>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, hackers@FreeBSD.ORG
Subject:   Re: Optimization
Message-ID:  <200006060142.SAA89210@apollo.backplane.com>
References:  <20000606031706.A41154@happy.checkpoint.com> <200006060031.JAA00841@daniel.sobral> <20000606035948.A41527@happy.checkpoint.com>

next in thread | previous in thread | raw e-mail | index | archive | help
    cc -S -O2 x.c


struct u {
    short a;
    short b;
};

struct u table[256];

void
fubar(int i)
{
    register struct u value = table[i];
    fubar2(value.a, value.b);
}

    But, as I said, spending all your time trying to optimize out a few
    5 nS instructions here and there is a supreme waste of time.  It
    will lull you into a false sense of performance and cause you to miss
    more obvious performance issues.

						-Matt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006060142.SAA89210>