Homework 2

 

Ø      Make a test program for performance testing the population and recovery of 3 dimensional arrays with each of the various element types (10 points each type, 20 points for correct array).

Ø      bool,

Ø      int,

Ø      long,

Ø      double

Ø      string,

Ø      formatted string,

Ø      StringBuilder string

Ø      object (holding int’s)

Ø      Array elements should hold the product of the 3 index elements, or for string arrays the string conversion of that product, or for bool just true.

Ø      Population example:             a[x,y,z]= x*y*z;

Ø      Recovery example:               v= a[x,y,z];

Ø      Make sure to do appropriate casting as necessary, especially for the objects.

 

Ø      EXTRA CREDIT: (5 points) Make a batch file to run the program, then rerun where ngen has been run against the program, and see if there is any difference for pre-JIT’ed and regular JIT Compiled code.