CS2851 -- Lab 4: Benchmarking
Fall 2005
Objectives Addressed
- understand and apply complex data structures and algorithms.
- be able to analyze the time complexity of algorithms, both sequential
and recursive.
- be able to apply standard library data structures in software design.
Procedure
You are to explore the impact of selecting various data structures
on the exectution time of the spell checking program implemented for the
first laboratory assignment. You should compare the following classes
that all implement the Set interface:
- Lookup (from Lab 1,
use both partners' implementations)
- TreeSet
- HashSet
- LinkedHashSet
In particular, you should analyze the impact of data structure choice on
both the add and contains
methods. Your analysis should include plots that describe the actual run
time as a function of input size (where input size is the size of the dictionary
file).
Relevant tidbits
- The challenge presented in this assignment is not the coding
(which should be trivial), but the experimental design. Focus
your efforts on how to best produce meaningful data.
- Your efforts should be focused on obtaining "worst-case" results.
- You may find the System.currentTimeMillis()
method to be especially useful for measuring execution time.
- In as much as it is possible, your program should measure the
the time elapsed while executing the methods being analyzed and
not any additional work.
- Your program should produce a comma delimited file that can be
imported into Excel. The numbers in this file (or files) should
be used to make the plots described above.
Lab report (due 11:00pm, the day prior to week 8 lab)
Here is a template file to use as a starting point
for this report.
Your report should include:
- Results: You should include at least one plot for each
method being analyzed. The plot should be in the form of a
.png or .jpg
image.
- A discussion of:
- How you designed your tests;
- Your results... any surprises?
- Conclusions based on your results (including
which implementation is most appropriate for
use in a typical spell checker application).
- The Documented source code
for your program.
- Be sure to log the time you spend on this project in the
FAST system.
As with any report you submit, correct spelling
and grammar are required. In addition, your report should be submitted
electronically following the
Electronic submission guidelines.
(You may wish to consult the XML help video
and/or sample report
before submitting your report.) Be sure to keep copies of all your
files, in case something gets lost.
If you have any questions, consult your instructor.
Acknowledgment
This assignment was originally developed by
Dr. Chris Taylor.