View Single Post
Re: Quake II Full Build all setup for .NET
Old
  (#16)
@$3.1415rin
Council Member, Author of JoeBOT
 
@$3.1415rin's Avatar
 
Status: Offline
Posts: 1,381
Join Date: Nov 2003
Location: Germany
Default Re: Quake II Full Build all setup for .NET - 16-05-2004

the classes itself are not slowing down your program, since you often need a pointer to some structure as an argument for a function, and tout a coup, you have the same like in C++

the virtual functions take more time, that's clear. Used carefully this isnt a major performance loss, but it can be simplifying your code, allowing multible use of the same code ... and having code being used quite often is very cache friendly

But like Killaruna once said : today we shouldnt bother about a couple of cycles spent extra for a virtual function. Good C++ is easy to maintain, and the main point of optimizing is optimizing the algorithms anyway. You cannot really improve the runtime of a bad algorithm by speeding up some parts, instead, it's hard work to slow down a good algorithm to the speed of a slow one, by using 'slow' stuff like virtual functions.


PS: Guess why current CPU have some part which is called branch prediction ... the have sometimes to respond to the demands of the coders, too


  
Reply With Quote