News for hackers. Stuff that matters.
Re:Zed Shaw on C++ by wglb on Friday July 16, 2010 @08:01AM (#1520864)
So does C++ have any price to pay for say vtables?
Re:Zed Shaw on C++ by kragen on Friday July 16, 2010 @05:03PM (#1522575)
vtables in C++ aren't free, but C++ has a couple of advantages here:

• If you're calling a nonvirtual method, you don't have to pay the vtable cost at all, just the cost of passing this. And most methods in C++ are nonvirtual.

• A call through a vtable is typically a couple of indexed fetches and an indirect jump. Objective-C's mechanism involves a hash-table lookup, which is a bit slower.

Re:Zed Shaw on C++ by woadwarrior01 on Friday July 16, 2010 @04:15PM (#1522378)
Thats why I called C++ `mostly static`.