Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does .so size affect virtual function performance

Recently, I met a performance problem. In Vtune result, virtual function cost is always the no.1 cost, when I reduce the so size which from 48M to 37M, the performance seems better, raise up 3.9%.

I wanna know, does the .so size realy affect virtual function performance, if so, why? Thanks!

like image 445
senlin.wang Avatar asked Mar 11 '26 04:03

senlin.wang


1 Answers

It is not purely size (though of course that affects paging after the program is loaded), but the number of adjustments the loader must make when loading a program. You can see that measured by setting the environment variable

LD_DEBUG=statistics

Virtual functions in particular will require a lot of adjustments during loading. For discussion on this,

like image 196
Thomas Dickey Avatar answered Mar 13 '26 19:03

Thomas Dickey