Updated Foxsays with Lab 3 README

This commit is contained in:
2025-09-13 21:32:41 -04:00
parent 6e7db90d1c
commit 603b360f6f

View File

@@ -99,3 +99,65 @@ Your code will be checked for speed and a leaderboard posted within Gradescope.
## Acknowledgments ## Acknowledgments
Problem from Kattis are used under their educational license. Problem from Kattis are used under their educational license.
# Lab 3: Empirical Analysis with Profiling
This lab is intended to be started in class, where additional background
information may be provided.
## Requirements
You will need to use a UNIX based system can run shell scripts. **STU** would be
a good resource.
## Goal
Utilize run-time profilers to identify poorly performing sections of a program
and then potential these areas.
## Process
### Part 1
Utilize the two programs from your "What does the Fox Say" homework. Run each of
these with the profiling information from the lecture slides
([cs412_03_EmpiricalAnalysis.pdf](https://canvas.jmu.edu/courses/2112008/files/178177075?wrap=1))
and gather/analyze this information. For the dict version of the program,
identify and try and to improve the portions of your program that take up the
most time.
### Part 2
Using the large examples files from "What does the Fox Say" homework and the
**split**, **wc**, **and head** UNIX commands, create input files of size 200K,
400K, 600K, 800K. To find out more about these UNIX commands, you can use Google
or the man pages from stu.
Write a shell script that performs this work and then runs the dict version of
your program capturing the execution time using the **time** UNIX command.
Create a plot of this run time where the Y axis is the run time and the X axis
is the input size. The shell script only needs to run your work and produce the
plots (it does not need to do the file manipulation, you can do that on your
own).
An example python script for creating the plot is here:
[line_plot.py](./line_plot.py)
## Deliverables
- A PDF (described below)
- Python script to create your plot
- Shell script to run your test cases
> Eclypse's Note: Did not need to submit a Shell script
Create a single PDF that contains the following information with two separate
sections (one for your list and one for your _dict_ versions of the HW 1). Each
section must showcase the results/output of 2 _cProfile_ runs. Then create a 3rd
section within the PDF that discusses the slowest portions of the _dict_
program. This discussion must include steps you tried in order to improve the
run time performance of your program.
For the 4th and final section, show the plot of your run times and discuss what
type of growth rate is experienced by your program and what portion of the
program you believe is responsible for this.