An advanced programmer's guide to efficient hardware utilization and compiler optimizations using C++ examples