Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What algorithm does gcc use to convert calls through function pointers to direct calls?

I've heard that recent versions of gcc are very good at converting calls through function pointers to direct calls. However, I can't find anything about it on the web or the quick look through gcc's source code. Does anyone know if this is actually true and if so, what algorithm does it use to do this?

like image 478
Timothy Jones Avatar asked Nov 14 '22 06:11

Timothy Jones


1 Answers

You might find this article interesting. It's dated 2005, and I'm not sure if that's 'recent' enough, but it deals with the subject comprehensively:

http://www.codeproject.com/KB/cpp/FastDelegate.aspx

like image 140
Eugene Smith Avatar answered Dec 19 '22 23:12

Eugene Smith