title |
---|
PS3 Questions |
Add your answers to this file in plain text after each question. Leave a blank line between the text of the question and the text of your answer.
Q1 What does argv[0]
always contain?
Q2 Which entry of argv
holds the first argument passed to the program?
Q3 Which entry of argv
holds the second argument passed to the program?
Q4 How would you print just the last argument passed to a program?
(NB: Q5 and Q6 compare float and double for -O0, Q7 and Q8 for -O3.)
Q5 What is the difference (ratio) in execution times between single and double precision for construction without optimization? Explain.
Q6 What is the difference (ratio) in execution times between single and double precision for multiplication without optimization? Explain.
Q7 What is the difference (ratio) in execution times between single and double precision for construction with optimization? Explain.
Q8 What is the difference (ratio) in execution times between single and double precision for multiplication with optimization? Explain.
Q9 What is the difference (ratio) in execution times for double precision multiplication with and without optimization? Explain.
Q10 What changes did you make to the code, if any?
Q11 Why did you make those changes?
Q12 What is the clock rate of your computer?
Q13 What is the max achieved single and double precision floating point rate of your timed code (with and without optimization)? What is the efficiency?
Q14 Does the operator*
performance match the hand-written variant? If not,
explain.
Extra credit: Can you think of a way to circumvent the problem (if there was a problem)?
Q15 The most important thing I learned from this assignment was ...
Q16 One thing I am still not clear on is ...