[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Benchmarks
- To: mab@AIDS-UNIX.ARPA
- Subject: Re: Benchmarks
- From: Masinter.pa@XEROX.ARPA
- Date: Fri, 27 Jul 84 22:14:00 GMT
- Cc: franz-friends@Berkeley
- In-reply-to: Mike Brzustowicz <mab@AIDS-UNIX.ARPA>'s message of 27 Jul 84 14:23:47 PDT (Fri)
- Original-date: 27 Jul 84 15:14 PDT
Here's a good benchmark:
(defun nilret () nil)
this is a good test of how fast your lisp returns NIL.
I also like
(defun retjunk (x) (cond((junkp x) 'junk)
((cdr x) (retjunk (car x)))
((= (car x) 'junk) (retjunk (cons (cdr x) (cdr x))))
(t (retjunk (cons 'junk x))))
(defun junkp (x) (equal (reverse (explode x)) (reverse (explode
'junk))))
This benchmark measures how fast your lisp can return junk, executing
the retjunk function.
Both of the benchmarks have the adavantage that they are small and can
be abused as benchmarks.