(defun factorial (n) (labels ((helper (n i acc) (if (< n i) acc (helper n (1+ i) (* i acc))))) (helper n 1 1))) CL-USER> (time (progn (factorial 100000) nil)) Evaluation took: 1.711 seconds of real time 1.719623 seconds of total run time (1.715548 user, 0.004075 system) [ Run times consist of 0.069 seconds GC time, and 1.651 seconds non-GC time. ] 100.53% CPU 5,985,246,295 processor cycles 9,030,022,672 bytes consed