SE250:lab-3:jham005

From Marks Wiki
Jump to navigation Jump to search

John Hamer's take on Lab#3

Graph of ArrayList times

Some interesting things that came up

I would like to see screencasts explaining each of these curios:

Growth factor 	Time taken
2	          9.6
4	          9.9
6	          8.9
8	          9.1
10	          8.5
12	          --
14	          8.4
16	          9.2
  • How come memory was exhausted when the growth factor was 12, but not 14 or 16?

printf( "Size = %d\n", arraylist_size );
  • How did the ArrayList get so many elements?

  • The program crashes when the growth factor is 1.0 (or 0.5, etc.). How come?

  • How can I tell whether the program crashed, or just ran out of memory?

  • Why is calling realloc() a good idea in general, but a bad idea for the timing experiments?

  • What is the shape of the curves for incremental growth and front insertion? How should you extrapolate this data?