tag:blogger.com,1999:blog-1872817975428307009.post5133455586413760344..comments2009-05-07T20:40:27.801-07:00Comments on cse471/598 Intro to AI Spring 2009 Blog: lisp time functionSubbarao Kambhampatihttp://www.blogger.com/profile/08449853328445416609noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1872817975428307009.post-75711175514130401952009-02-21T09:07:00.000-08:002009-02-21T09:07:00.000-08:00I think he's more interested in a lisp function th...I think he's more interested in a lisp function that generates the same output as in the sample:<BR/><BR/> USER(110): (time (loop for x from 1 to 1000 do ( + x x)))<BR/> ; cpu time (non-gc) 130 msec user, 10 msec system<BR/> ; cpu time (gc) 140 msec user, 0 msec system<BR/> ; cpu time (total) 270 msec user, 10 msec system<BR/> ; real time 390 msec<BR/> ; space allocation:<BR/> ; 24,125 cons cells, 0 symbols, 88,120 other bytes<BR/> NIL<BR/><BR/><BR/>As opposed to this, which I'm getting and he is too, apparently:<BR/><BR/>Real time: 0.0 sec.<BR/>Run time: 0.0 sec.<BR/>Space: 45764 BytesRyan Moriartyhttps://www.blogger.com/profile/00497742758091328657noreply@blogger.comtag:blogger.com,1999:blog-1872817975428307009.post-91902477587989993782009-02-20T16:43:00.000-08:002009-02-20T16:43:00.000-08:00If you're using a *ix box, you can use the time co...If you're using a *ix box, you can use the time command if you can figure out how to invoke the interpreter in a non-interactive mode.jmajorshttps://www.blogger.com/profile/02469675915989613659noreply@blogger.comtag:blogger.com,1999:blog-1872817975428307009.post-77975925365854361842009-02-20T13:39:00.000-08:002009-02-20T13:39:00.000-08:00Run your code a thousand times in a loop inside th...Run your code a thousand times in a loop inside the time function to find the time in milliseconds :DSushovan Dehttps://www.blogger.com/profile/11160553154275818207noreply@blogger.com