Changes

Jump to: navigation, search

Optimization

3,801 bytes added, 23:12, 6 December 2018
Created page with "'''Home * Programming * Optimization''' '''Optimization''' is about to chose the best element from some set of available alternatives, as referred in [https..."
'''[[Main Page|Home]] * [[Programming]] * Optimization'''

'''Optimization''' is about to chose the best element from some set of available alternatives, as referred in [https://en.wikipedia.org/wiki/Mathematical_optimization mathematical optimization] as for instance applied in computer chess to optimize [[Evaluation|evaluation]] weights with [[Automated Tuning|automated tuning methods]], and [https://en.wikipedia.org/wiki/Program_optimization program optimizations], which is the topic covered on this page. Most importantly there is the [[Algorithms|algorithmic]] optimization on design level such as using [[Alpha-Beta|alpha-beta]] rather than plain [[Minimax|minimax]], followed by source code optimizations, and finally [https://en.wikipedia.org/wiki/Compiler_optimization Compiler optimizations].

=Premature Optimization=
As a warning on premature optimization a quote by [[Donald Knuth]] <ref>[[Donald Knuth]] ('''1974''').''Structured Programming with go to Statements''. [[ACM#Surveys|ACM Computing Surveys]], Vol. 6, No. 4, [http://cs.sjsu.edu/~mak/CS185C/KnuthStructuredProgrammingGoTo.pdf pdf]</ref>:
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.

=Program Optimizations=
Program Optimization is a necessary part of a decent chess program. It comes in two forms, compiler-end and program-end. Compiler-end optimization involves using specific flags to get a quick program at the cost of speed of compile and memory usage, whereas program-end optimization involves using inline functions and things like that.

* [[Avoiding Branches]]
* [[Performance Measurement]]
* [[Profiling]]
* [[SIMD and SWAR Techniques]]

=See also=
* [[Automated Tuning]]
* [[Genetic Programming]]
* [[NUMA]]
* [[Simulated Annealing]]

=Publications=
* [[Bruce W. Leverett]] ('''1981'''). ''Register allocation in optimizing compilers''. Ph.D. thesis, [[Carnegie Mellon University]]
* [[Bruce W. Leverett]] ('''1982'''). ''[http://books.google.com/books/about/Topics_in_Code_Generation_and_Register_A.html?id=ZNoEHAAACAAJ&redir_esc=y Topics in Code Generation and Register Allocation]''. [[Carnegie Mellon University]]
* [[Bruce W. Leverett]] ('''1983'''). ''[http://books.google.com/books/about/Register_allocation_in_optimizing_compil.html?id=BUkVAQAAIAAJ&redir_esc=y Register allocation in optimizing compilers]''. UMI Research Press

=Forum Posts=
* [http://www.talkchess.com/forum/viewtopic.php?t=61373 Beginner's guide to graphical profiling] by [[Matthew Lai]], [[CCC]], September 10, 2016 » [[Profiling]], [[Giraffe]]
: [http://www.talkchess.com/forum/viewtopic.php?t=61373&start=2 Re: Beginner's guide to graphical profiling] by [[Marco Costalba]], [[CCC]], September 10, 2016 » [[Stockfish]]
* [http://www.talkchess.com/forum/viewtopic.php?t=66701 Reliable speed comparison: some math required] by [[Marco Costalba]], [[CCC]], February 27, 2018 » [[Nodes per Second]]

=External Links=
==Program Optimization==
* [https://en.wikipedia.org/wiki/Program_optimization Program optimization from Wikipedia]
* [https://en.wikipedia.org/wiki/Compiler_optimization Compiler optimization from Wikipedia]
* [http://www.agner.org/optimize/ Software optimization resources. C++ and assembly. Windows, Linux, BSD, Mac OS X] by [http://www.agner.org/ Agner Fog]
* [http://www.azillionmonkeys.com/qed/optimize.html Programming Optimization] by [[Paul Hsieh]]
==Mathematical Optimization==
* [https://en.wikipedia.org/wiki/Mathematical_optimization Mathematical optimization from Wikipedia]
: [https://en.wikipedia.org/wiki/Global_optimization Global optimization from Wikipedia]
: [https://en.wikipedia.org/wiki/Optimization_problem Optimization problem from Wikipedia]

=References=
<references />
'''[[Programming|Up one Level]]'''

Navigation menu