

































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Shun faster algorithms to avoid complexity in program. • Instead, wait for simple N2 algorithms, when N log N alternatives exist of modest complexity ...
Typology: Slides
1 / 41
This page cannot be seen from the preview
Don't miss anything!
z
z
Command line application z Basic usage is: gcc –o program_name source.c
Use extension “.c” or “.cpp” for source code z Reads in source(s), creates executableprogram
z
z
z
Compare two algorithms for one task z Predict performance in a new environment
If we had a computer that was 10x faster and couldhandle 10x more data, how would approach perform? z Set values of algorithm parameters
Ignore performance of algorithm
Shun faster algorithms to avoid complexity in program
Instead, wait for simple
2 algorithms, when N log N alternatives exist of modest complexity available z Too much weight on performance of algorithm
Improving a very fast program is not worth it
Spending too much time tinkering with code is rarelygood use of time
z
z
z
z
z
z
z
z
z
z Examples
Degree of polynomial
Number of characters in a string
Size of file to be sorted
Number of input data items
Some other abstract measure of problem size z With multiple parameters, we can often holdone of them constant