analyzeTime compares the time it takes to run two functions

analyzeTime(title, fill = c("cornflowerblue", "#009E73"), func1, func2)

Arguments

title

title of the graph to be created

fill

a vector of length two of colors for the bargraphs

func1

first function to be analyzed

func2

second function to be analyzed

Value

a bar graph displaying the user time comparison of the two functions

Details

This function takes two functions and displays the user time each took, as well as a bar graph of the comparison

Examples

analyzeTime(title = "Fibonacci vs. Memoized Fibonacci", func1 = fib(30), func2 = fib_memoized(30,createList(30)))
#> Function Time #> 1 functionOne 6.94 #> 2 functionTwo 0.12
#> Loading required package: ggplot2