Boxing and Unboxing ??

B

Barry Kelly

Peter said:
A pointer dereference is not expensive. I just benchmarked it at only 16% more
total time, in a tight loop.

A pointer dereference could potentially take seconds, if the page being
pointed to has been paged out by the OS. The memory hierarchy, and costs
of virtual memory lookup if the page isn't in the TLB, are substantial.
Of course you don't see them in a tight loop because all the caches etc.
aren't missing in that case. But the costs are substantial when missed.

-- Barry
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Bruce said:
By the way, C# has no concept of "friend", and there's really no way to
fake it.

InternalsVisibleToAttribute has some similarities to friend.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top