4 ms·
C++ was designed in a way where only the features you use have overhead, so it is fairly easy to write the most computationally intense parts in C while using h
by killedbydeath 16y ago
C++ was designed in a way where only the features you use have overhead, so it is fairly easy to write the most computationally intense parts in C while using higher level abstractions everywhere else. This is something I missed a lot in Java when trying to write high performance code.
- dfox 16y agoBut most of this design was done 20 years ago and so used assumptions about CPU performance are mostly wrong for both modern CPUs and modern operating systems. For example overhead of calling virtual and non-virtual method across library boundary on ELF based system on reasonably modern CPU is essentially same.
- beagle3 16y agoThis is a very minor detail - so an optimization that was made 20 years ago is no longer relevant. Neither is it harmful or especially expensive.