lisp lang examples
This commit is contained in:
parent
64f1523778
commit
2d105b2d9b
2 changed files with 15 additions and 0 deletions
10
lisp/example1.lisp
Normal file
10
lisp/example1.lisp
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
(defun b1 ()
|
||||||
|
(let ((x 0))
|
||||||
|
(dotimes (n 250000000) (incf x))
|
||||||
|
x))
|
||||||
|
|
||||||
|
(defun b2 ()
|
||||||
|
(let ((x 0))
|
||||||
|
(declare (fixnum x))
|
||||||
|
(dotimes (n 1000000000) (incf x))
|
||||||
|
x))
|
||||||
|
|
@ -8,4 +8,9 @@
|
||||||
|
|
||||||
(time (dotimes (i 1000) (main-one '("69" "12" "1" "2" "11" "12" "1" "2" "11" "12" "1" "2" "11"))))
|
(time (dotimes (i 1000) (main-one '("69" "12" "1" "2" "11" "12" "1" "2" "11" "12" "1" "2" "11"))))
|
||||||
|
|
||||||
|
cmd
|
||||||
|
/usr/bin/time -v ./solution 477550 25000 19410 35300 1525 15800 25000 19410 35300 1525 15800 25000 19410 35300 1525 15800 25000 19410 35300 1525 15800 25000 19410 35300 1525 15800
|
||||||
|
|
||||||
|
/usr/bin/time -v ./solution3 477550 25000 1525 35300 19410 19410 1525 25000 15800 35300 25000 35300 1525 19410 15800 15800 25000 1525 15800 19410 35300 19410 25000 1525 35300 15800
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue