added time performance profiles before and after memoizing