Re: __attribute__((packed)) for enum

Niklas Nebel <[email protected]> Wed, 18 May 2011 11:06:45 +0200
Newsgroups gmane.comp.openoffice.devel.general
Message-ID <[email protected]>
On 18.05.2011 03:40, tora - Takamichi Akiyama wrote:
> The size of class Impl_Font would reduce to 50 bytes or so from 88 bytes.
>
> How big benefits could we get when such structure or class instances are
> produced in large numbers?

Generally, this is a very valid concern. In some places where we found 
out (or just assumed) that it makes a difference, we currently use 
smaller integer types directly for member variables, instead of enum. 
For example, see eCellType in ScBaseCell (sc/inc/cell.hxx). Or 
FormulaToken (formula/inc/formula/token.hxx), where the type of eOp and 
eType even depends on DBG_UTIL.

I don't know if Font objects are constructed in very large numbers.

Niklas
-- 
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help