Originally Posted By: siberia37
Originally Posted By: canuckInOR
Originally Posted By: siberia37
There is a lot of value in knowning when to start doing memcpy (or even inline assembler) to optimize something and when to leave well enough alone. It's not always obvious when to do this with today's very smart compilers, and libraries that have been highly optimized over the years.

I disagree. It's very obvious when to do this, and the answer is "after performance has been deemed unacceptable by the user, and profiling has demonstrated where the bottlenecks are."


I think you need to add.. "and it can be proven that you could write something faster than the library". Unless your a wiz at counting clock cycles and understand modern assembler thoroughly (and how your compiler produces it) it really can be hard to beat a lot of library functions.

I thought that part was implicit in the profiling bit, i.e. if you haven't profiled your replacement to whatever the bottleneck is, then you have no idea if you've actually made an improvement.