I feel outraged -
Don
nospam at nospam.com
Thu Oct 15 07:00:42 PDT 2009
Justin Johansson wrote:
> - that the .sizeof a delegate is 8 bytes (on a 32-bit machine).
>
> AFAIK, stack pushes are still more expensive than a pointer dereference in contemporary
> CPU architectures.
>
> Justin
Not so. On 286 and earlier, stack pushes were more expensive. They're
the same on 386 and later (including Core2, K7,K8,K10), but you have a
chance of a cache miss with a pointer deref. In my C++ experience I got
a 25% speedup of my entire app by replacing heap pointers with stack
delegates!
More information about the Digitalmars-d
mailing list