gihnius
2014-10-19 11:46:37 +08:00
common lisp 直接算:
```
CL-USER> (time (loop for i from 1 to 1000000000 sum i))
Evaluation took:
2.877 seconds of real time
2.888336 seconds of total run time (2.878674 user, 0.009662 system)
100.38% CPU
6,603,209,056 processor cycles
32,912 bytes consed
500000000500000000
CL-USER> (time (let ((sum 0)) (dotimes (x 1000000001) (incf sum x)) sum))
Evaluation took:
2.883 seconds of real time
2.894640 seconds of total run time (2.884340 user, 0.010300 system)
100.42% CPU
6,616,544,771 processor cycles
33,296 bytes consed
500000000500000000
```