(FILECREATED "28-Aug-86 14:23:43" {QV}<PEDERSEN>LISP>TEST-BOXED-FLOAT.;1 7301 changes to: (VARS TESTFLOATCOMS TEST-BOXED-FLOATCOMS BOXED-FLOAT-BENCHMARK-SUITE) (FNS RUN-FLOAT-BENCHMARKS RUN-BOXED-FLOAT-BENCHMARKS PRINT-BOXED-FLOAT-BENCHMARK TEST.FABS TEST.FDIFFERENCE TEST.FGREATERP TEST.FMAX TEST.FMIN TEST.FMINUS TEST.FPLUS TEST.FQUOTIENT TEST.FTIMES TEST.FIX TEST.FEMPTYLOOP) (FILES UNBOXEDOPS) previous date: "20-Aug-86 18:19:21" {QV}<PEDERSEN>LISP>TESTFLOAT.;5) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT TEST-BOXED-FLOATCOMS) (RPAQQ TEST-BOXED-FLOATCOMS ((FNS PRINT-BOXED-FLOAT-BENCHMARK RUN-BOXED-FLOAT-BENCHMARKS TEST.FABS TEST.FDIFFERENCE TEST.FEMPTYLOOP TEST.FGREATERP TEST.FIX TEST.FMAX TEST.FMIN TEST.FMINUS TEST.FPLUS TEST.FQUOTIENT TEST.FTIMES) (VARS BOXED-FLOAT-BENCHMARK-SUITE))) (DEFINEQ (PRINT-BOXED-FLOAT-BENCHMARK (LAMBDA (F N) (* jop: "20-Aug-86 17:09") (LET ((TESTFN (PACK* (QUOTE TEST.) F))) (PRINTOUT T T "***************" %, F %, "Benchmark ******************" T T) (PRINTOUT T T T "Starting the" %, F %, "run (TIMEALL (" TESTFN %, N ")" T T) (SETQ VALUE (TIMEALL (APPLY* TESTFN N))) (PRINTOUT T "Value is" %, VALUE T T) (FRPTQ 10 (RECLAIM)) (PRINTOUT T T "Repeating the TIMEALL" T T) (SETQ VALUE (TIMEALL (APPLY* TESTFN N))) (PRINTOUT T "Value is" %, VALUE T T) (FRPTQ 10 (RECLAIM)) (PRINTOUT T T F %, "Finished" T T)))) (RUN-BOXED-FLOAT-BENCHMARKS (LAMBDA (BENCHMARKS) (* jop: "31-Mar-86 16:54") (* * BENCHMARKS should be a list of the desired Benchmarks) (DECLARE (GLOBALVARS BOXED-FLOAT-BENCHMARK-SUITE)) (if (NULL BENCHMARKS) then (SETQ BENCHMARKS BOXED-FLOAT-BENCHMARK-SUITE)) (RESETLST (LET ((DRIBBLE.FILE (PACKFILENAME (QUOTE HOST) (QUOTE DSK) (QUOTE NAME) (PACK* MAKESYSNAME "-" (MACHINETYPE) "-BOXEDFLOAT") (QUOTE EXTENSION) (QUOTE BENCHMARKS))) VALUE) (DECLARE (SPECVARS VALUE)) (RESETSAVE NIL (QUOTE (TERPRI))) (RESETSAVE *PRINT-ARRAY* T) (RESETSAVE NIL (LIST (QUOTE PRIN1) (CONCAT "Benchmark Results in " DRIBBLE.FILE))) (RESETSAVE (DRIBBLE DRIBBLE.FILE)) (MOVD (QUOTE PAGEFULLFN) (QUOTE PAGEFULLFN.SAVE)) (RESETSAVE NIL (QUOTE (MOVD PAGEFULLFN.SAVE PAGEFULLFN))) (MOVD (QUOTE NILL) (QUOTE PAGEFULLFN)) (printout T T "MACHINETYPE = " (MACHINETYPE) T) (printout T T "MAKESYSNAME = " MAKESYSNAME T) (printout T T "MAKESYSDATE = " MAKESYSDATE T) (printout T T "DATE = " (DATE) T) (printout T T "USERNAME = " (USERNAME) T T) (for BM in BENCHMARKS do (PRINT-BOXED-FLOAT-BENCHMARK (CAR BM) (CADR BM))) (PRINTOUT T "Finished benchmarking" T T))))) (TEST.FABS (LAMBDA (N) (* jop: "20-Aug-86 17:15") (bind (X ← 1.0) for I from 1 to N do (SETQ RESULT (FABS X)) finally (RETURN RESULT)))) (TEST.FDIFFERENCE (LAMBDA (N) (* jop: "20-Aug-86 17:12") (bind (X ← 1.0) (RESULT ← 0.0) for I from 1 to N do (SETQ RESULT (FDIFFERENCE RESULT X)) finally (RETURN RESULT)))) (TEST.FEMPTYLOOP (LAMBDA (N) (* jop: "20-Aug-86 18:16") (for I from 1 to N do NIL))) (TEST.FGREATERP (LAMBDA (N) (* jop: "20-Aug-86 16:49") (bind (X ← 2.0) (Y ← 1.0) RESULT for I from 1 to N do (SETQ RESULT (FGREATERP X Y)) finally (RETURN RESULT)))) (TEST.FIX (LAMBDA (N) (* jop: "20-Aug-86 17:11") (bind (X ← 1.0) RESULT for I from 1 to N do (SETQ RESULT (FIX X)) finally (RETURN RESULT)))) (TEST.FMAX (LAMBDA (N) (* jop: "20-Aug-86 17:16") (bind (X ← 1.0) (Y ← 2.0) (RESULT ← 0.0) for I from 1 to N do (SETQ RESULT (FMAX X Y)) finally (RETURN RESULT)))) (TEST.FMIN (LAMBDA (N) (* jop: "20-Aug-86 17:15") (bind (X ← 1.0) (Y ← 2.0) (RESULT ← 0.0) for I from 1 to N do (SETQ RESULT (FMIN X Y)) finally (RETURN RESULT)))) (TEST.FMINUS (LAMBDA (N) (* jop: "20-Aug-86 17:18") (bind (X ← 1.0) (RESULT ← 0.0) for I from 1 to N do (SETQ RESULT (FMINUS X)) finally (RETURN RESULT)))) (TEST.FPLUS (LAMBDA (N) (* jop: "20-Aug-86 17:13") (bind (X ← 1.0) (RESULT ← 0.0) for I from 1 to N do (SETQ RESULT (FPLUS RESULT X)) finally (RETURN RESULT)))) (TEST.FQUOTIENT (LAMBDA (N) (* jop: "20-Aug-86 17:13") (bind (X ← .99999) (RESULT ← 1.0) for I from 1 to N do (SETQ RESULT (FQUOTIENT RESULT X)) finally (RETURN RESULT)))) (TEST.FTIMES (LAMBDA (N) (* jop: "20-Aug-86 17:13") (bind (X ← 1.0001) (RESULT ← 1.0) for I from 1 to N do (SETQ RESULT (FTIMES RESULT X)) finally (RETURN RESULT)))) ) (RPAQQ BOXED-FLOAT-BENCHMARK-SUITE ((FEMPTYLOOP 10000) (FPLUS 10000) (FDIFFERENCE 10000) (FTIMES 10000) (FQUOTIENT 10000) (FGREATERP 10000) (FABS 10000) (FMINUS 10000) (FIX 10000) (FMAX 10000) (FMIN 10000))) (PUTPROPS TEST-BOXED-FLOAT COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (1054 6641 (PRINT-BOXED-FLOAT-BENCHMARK 1064 . 1783) (RUN-BOXED-FLOAT-BENCHMARKS 1785 . 3823) (TEST.FABS 3825 . 4050) (TEST.FDIFFERENCE 4052 . 4330) (TEST.FEMPTYLOOP 4332 . 4497) ( TEST.FGREATERP 4499 . 4773) (TEST.FIX 4775 . 5015) (TEST.FMAX 5017 . 5289) (TEST.FMIN 5291 . 5563) ( TEST.FMINUS 5565 . 5819) (TEST.FPLUS 5821 . 6087) (TEST.FQUOTIENT 6089 . 6366) (TEST.FTIMES 6368 . 6639))))) STOP