Profiling "Evolution of a Haskell Programmer"
Haskell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
.gitignore
All.hs
Evolution_01_Freshman.hs
Evolution_02_Sophomore.hs
Evolution_03_Junior.hs
Evolution_04_Junior2.hs
Evolution_05_Senior.hs
Evolution_06_Senior2.hs
Evolution_07_Senior3.hs
Evolution_08_Memoizing.hs
Evolution_09_Pointless.hs
Evolution_10_Iterative.hs
Evolution_11_IterativeOneLiner.hs
Evolution_12_Accumulating.hs
Evolution_13_ContinuationPassing.hs
Evolution_14_BoyScout.hs
Evolution_15_Combinatory.hs
Evolution_16_ListEncoding.hs
Evolution_17_Interpretive.hs
Evolution_18_Static.hs
Evolution_19_BeginningGraduate.hs
Evolution_20_Origamist.hs
Evolution_21_CartesianallyInclined.hs
Evolution_22_PHD.hs
Evolution_23_PostDoc.hs
Evolution_24_TenuredProfessor.hs
Main.hs
Makefile
README.md

README.md

HaskellEvolutionProfile

Profiling "Evolution of a Haskell Programmer" using Criterion

This project aims to profile the various factorial solutions presented in "Evolution of a Haskell Programmer" by using the Criterion profiling library.

Omissions

The static solution won't have a run-time component worth profiling ;-)

Running

The runtimes are calculated for an average of 100 evaluations of fac 8.

Generate a profiling report by running make. The report should be generated at "images/report1.html".

I reran the report three-times with the worst offenders removed to show the variance between good solutions. These results can be found at "images/report2.html", "images/report3.html" and "images/report4.html" respectively.

Results

The memoizing solution seems to be the clear winner at this point, with PHD solution being the clear loser:

X-Axis in milliseconds:

All results

X-Axis in microseconds:

Partial results 2

X-Axis in nanoseconds:

Partial results 3

X-Axis in nanoseconds:

Partial results 4