Название: C++: Optimization Techniques
Автор: Henry P. Delima
Издательство: Amazon.com Services LLC
Год: 2020
Страниц: 433
Язык: английский
Формат: pdf, azw3, epub
Размер: 10.1 MB
Why Optimization Is Necessary: Assuming that our programs are too big, or too slow, why don't we just add more memory or a faster processor? If that isn't possible today, then the next generation of processors should be powerful enough to spare us such concerns. It may seem obvious that, before you can optimize a program, you have to know what is making it inefficient. Of course, if you run out of memory or disk space while executing the program, this determination becomes much simpler. Depending on which language and machine you are using, there may be "profiling" tools available which allow you to determine where your program is spending most of its time. These, of course, are most useful when the problem is CPU time, but even if that is not the problem, you may still be able to find out that, e.g., your program is spending 95% of its time in the disk reading and/or writing routines.