[Vm-beginners] An interesting tidbit for the record

Bert Freudenberg bert at freudenbergs.de
Tue Jan 14 13:35:28 UTC 2014


On 14.01.2014, at 00:50, gettimothy <gettimothy at zoho.com> wrote:

> in CogBytecodeDescriptor a portion of the class comment reads: " The order of my instance variables is chosen for compact struct packing."
> 
> In user-space I have never even considered the order of my instance variables. From that comment, it seems it can matter.

Well, in that context it is only relevant for Slang code, after it has been translated to C.

In regular code, the first 8/16 inst vars are faster to write/read than the higher-numbered ones. Similarly for temps and literals.

- Bert -


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4142 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-beginners/attachments/20140114/d46ab36b/smime.bin


More information about the VM-beginners mailing list