2010/10/13 Henrik Nordström <[email protected]>: > ons 2010-10-13 klockan 20:50 +0200 skrev Kinkie: >> I agree. That's why I propose to only use it - if we do use it for >> anything - for singletons, where it should be a no-brainer. > > Have you checked if it makes any difference in the proposed use you see > today?
Yes it does. The resulting code is more compact, and has a different jump structure. Unfortunately I am not an assembler expert to judge whether it is a good or a bad thing; if you wish I can attach the asm code of the relevant function; in general I'd tend to trust the gcc authors, and the fact that it's a technique widely used in a highly sensitive project (the Linux kernel) [http://kerneltrap.org/node/4705]. IF we decide it's worth to use this, other obvious candeidates for useage would be Must() and assert (the latter case may be already done by the library for us). As I may have already stated, I would advise against using this in "regular" code. -- /kinkie
