Modified from hackage: Determine the complexity of functions by testing them on inputs of various sizes.