7 Apr
2009
7 Apr
'09
5:49 a.m.
Steven Watanabe wrote:
This is not entirely optimal though as it requires 3 MOV instructions to create the scs void* copy when SYNCH is false (and I'd rather not lean on compiler optimizations even if they will help in this case).
Why not? Have you actually looked at what compiler optimizations do? The optimization required is really not very sophisticated.
Mmm. I know that compilers do much more sophisticated optimization than this but I just figured that there was a more elegant way to express my actual intent here. Using a 'void*' when it isn't ever actually used/read seems like a 'hack' [and I don't like writing superfluous code]. However, it seems that there's no better approach in this case, so it will be fine. Thanks, Jonathan