|
|
|
|
|
by iainmerrick
2850 days ago
|
|
I haven’t checked but I wouldn’t be surprised if they are duplicated. (Edit to add: if this done, it’ll be part of the link-time optimization step, which I think is relatively new in all the major C++ compilers.) If you include debugging symbols, there will probably be multiple copies of the duplicated code just because it has different names. You certainly should be able to merge duplicated functions after stripping symbols but I don’t know if that’s a standard thing. I’ve definitely been disappointed in the past by the performance of “dead code stripping” optimization. It’s not quite as trivial a problem as it sounds because when you have groups of functions that call each other, you need to unify two graphs rather than just look for individual identical blobs. The obvious implementation (multiple passes looking for identical leaf functions) is slow and will miss some cases. |
|