Exercise 00 - Execution Efficiency

Out: Wednesday January 3, 2018
Due: Friday January 5, 2018 by 11:15am.


  1. Fetch source file ex00.c, the "fully working" implementation of a skeleton password cracker.

  2. Build an executable from the source code. We will (mostly) be using C11 in this course, so:
    gcc -std=c11 -Wall -g ex00.c -o ex00

  3. Run the executable you just created on attu using time (man time):
    time ./ex00
    Record the amount of CPU time required for execution.

  4. The previous steps built an executable with minimal code optimizations, resulting in machine code similar to what you're taught in CSE 351. Now rebuild the executable, this time enabling optimization level 3 (high optimization). It is intended that you look up how to do this. (We'd like to think you'll use man gcc, but we know you'll probably use google.)

  5. Run the optimized executable on attu and record the CPU time consumed.

  6. ex00.java begins an implementation of the same computation as ex00.c but written in Java. Complete this implementation - don't dismantle what is there, just add whatever is needed.

  7. Run your completed java implementation using time to detemine the CPU time consumed.

  8. Hand in to the course dropbox:
(The following are generic requirements that will appear every exercise. Exactly how pertient they are can vary from one exercise to another.)

Your code must: