#!/usr/bin/newlisp

# loops - benchmark
#
# newLISP also has a 'for' which takes an initilizer for the looping
# variable and is a bit slower
#
# Contributed by Lutz Mueller

(set 'n (integer (main-args 2)))
(set 'x 0)

(dotimes (a n)
	(dotimes (b n)
		(dotimes (c n)
			(dotimes (d n)
				(dotimes (e n)
					(dotimes (f n)
						(inc 'x)))))))

(println x)

(exit)



syntax highlighting with newLISP and syntax.cgi