|Re: [eigen] patch (enums)|
[ Thread Index |
| More lists.tuxfamily.org/eigen Archives
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] patch (enums)
- From: "Schleimer, Ben" <bensch128@xxxxxxxxx>
- Date: Thu, 10 Jan 2008 11:49:10 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2ZJxWaJi5uoYrm8wttdQOypza4hZ6hC6i4vTpFXbV8ecT15KQPzGld+ZOz3G1b+Zd1rCIYQgGrWZx23HJqV7NTRHqudsyH5nRGvCzn0zL0lPYKLtNe9v2+0a9vpqABzJCv0/zmV2DRMMVLLx4Fs0KVd0Z7FIE5M5KXK8ZvQcJ0E=;
--- Benoît Jacob <jacob@xxxxxxxxxxxxxxx> wrote:
> Hi List,
> please find attached the patch for removing the "static const int" everywhere.
> Instead, using enums in classes and #defines for the global constants (just
> to test performance).
> Here, it does not at all change performance, both with g++-4.2 and g++-4.1!
> Therefore I am not so sure anymore if I want to move to enums. Please share
> your opinion!
> It seems to me that g++ had no problem at all optimizing the "static const
> int" as mere literals!
I think that the static const ints are unnecessarily stored in data segment of the compiled
program. It would be good to check the size difference of the executables before you revert back
to static const ints.