Click here to Skip to main content
15,918,471 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPerformance and footprint of virtual function Pin
George_George30-Jan-08 21:59
George_George30-Jan-08 21:59 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 22:17
mveCPallini30-Jan-08 22:17 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 22:25
George_George30-Jan-08 22:25 
GeneralRe: Performance and footprint of virtual function Pin
Iain Clarke, Warrior Programmer30-Jan-08 22:41
Iain Clarke, Warrior Programmer30-Jan-08 22:41 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:05
George_George30-Jan-08 23:05 
GeneralRe: Performance and footprint of virtual function Pin
Iain Clarke, Warrior Programmer30-Jan-08 23:17
Iain Clarke, Warrior Programmer30-Jan-08 23:17 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:21
George_George30-Jan-08 23:21 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 22:44
mveCPallini30-Jan-08 22:44 
George_George wrote:
Algorithm? We are talking about why virtual function degrate performance compared with normal function. My point is that it needs runtime (compared with compile time) getting the address of invoked function and it also needs to have a more level of indirection through __vfptr. Do you agree or think there are any other aspects which matter performance?


I mean, is well known that VTABLE indirection causes a performance loss.
But in the real world usually algorithms matter and usually OOP advantages well balances the performance loss.


George_George wrote:
My question is, for normal function call, how did an instance of a class find the address of function to be called (surely not through __vfptr).

Pointer?
Big Grin | :-D

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:02
George_George30-Jan-08 23:02 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 23:07
mveCPallini30-Jan-08 23:07 
GeneralRe: Performance and footprint of virtual function Pin
Cedric Moonen30-Jan-08 22:44
Cedric Moonen30-Jan-08 22:44 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 22:59
George_George30-Jan-08 22:59 
QuestionAlternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 21:52
demxine30-Jan-08 21:52 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Iain Clarke, Warrior Programmer30-Jan-08 21:59
Iain Clarke, Warrior Programmer30-Jan-08 21:59 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 22:14
demxine30-Jan-08 22:14 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Iain Clarke, Warrior Programmer30-Jan-08 22:28
Iain Clarke, Warrior Programmer30-Jan-08 22:28 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow31-Jan-08 3:05
David Crow31-Jan-08 3:05 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Haroon Sarwar30-Jan-08 22:37
Haroon Sarwar30-Jan-08 22:37 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 23:40
demxine30-Jan-08 23:40 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Haroon Sarwar30-Jan-08 23:53
Haroon Sarwar30-Jan-08 23:53 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow31-Jan-08 3:04
David Crow31-Jan-08 3:04 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine31-Jan-08 14:20
demxine31-Jan-08 14:20 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow1-Feb-08 3:05
David Crow1-Feb-08 3:05 
QuestionSAPI within Windows SDK? Pin
_NielsB30-Jan-08 20:53
_NielsB30-Jan-08 20:53 
GeneralActiveX control richedit control hides when pressing Alt key Pin
ShilpiP30-Jan-08 20:47
ShilpiP30-Jan-08 20:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.