Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Misc > Re: FreePascal'...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 720 of 806
Post > Topic >>

Re: FreePascal's $PackRecords and alignment

by Jonas Maebe <Jonas.Maebe@[EMAIL PROTECTED] > Feb 21, 2007 at 01:33 PM

In article <erfvc6$5v7$1@[EMAIL PROTECTED]
>, Stephen <stephen@[EMAIL PROTECTED]
> wrote:

> The documentation says the values can be 1, 2, 4, 16, and C. I 
> understand the default is to align on 2 byte boundaries, and that 1 
> is the same as a 'packed' record, but how do I know exactly when to 
> choose 2, 4, 16, etc.?

4 probably provides the best overall performance nowadays (unless you 
have a lot of records with doubles which are wrongly aligned if you use 
this settings).

> Are there performance gains if I use a higher 
> alignment value?

Potentially, yes. There can also be performance losses, because higher 
alignment results in more wasted space in the cpu caches (all the 
padding takes up space in the cpu's caches).


Jonas
 




 5 Posts in Topic:
FreePascal's $PackRecords and alignment
Stephen <stephen@[EMAI  2007-02-21 00:14:14 
Re: FreePascal's $PackRecords and alignment
Marco van de Voort <ma  2007-02-21 12:03:52 
Re: FreePascal's $PackRecords and alignment
Jonas Maebe <Jonas.Mae  2007-02-21 13:36:40 
Re: FreePascal's $PackRecords and alignment
Marco van de Voort <ma  2007-02-21 14:34:29 
Re: FreePascal's $PackRecords and alignment
Jonas Maebe <Jonas.Mae  2007-02-21 13:33:46 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 6:09:17 CDT 2008.