From: Marc BATTYANI

Subject: Re: Franz ACL 4.3.2 for Windows compared to ACL 3.0.1

Date: 1997-6-10 3:55

Can somebody post a disassembly of the benchmark using ACL 4.3.2?
Thanks
Marc Battyani

(defun pnpoly (npol xp yp x y)
  (declare (optimize (speed 3) (safety 0))
	   (fixnum npol)
	   (double-float x y)
	   (type (simple-array double-float (*)) xp yp))
  (let* ((c nil)
	 (j (1- npol)))
    (declare (fixnum j))
    (dotimes (i npol c)
      (declare (fixnum i))
      (if (and (or (and (<= (aref yp i) y) (< y (aref yp j)))
		   (and (<= (aref yp j) y) (< y (aref yp i))))
	       (< x (+ (aref xp i) (/ (* (- (aref xp j) (aref xp i)) (- y (aref 
yp i)))
				      (- (aref yp j) (aref yp i))))))
	  (setq c (not c)))
      (setq j i))))

(defun pnpolytest ()
  (declare (optimize (speed 3) (safety 0)))
  (let ((npol 20)
	(count 0)
	(xp (make-array 20 :element-type 'double-float
			:initial-contents '(0.0d0 1.0d0 1.0d0 0.0d0 0.0d0 1.0d0 -0.5d0 -1.0d0
					    -1.0d0 -2.0d0 -2.5d0 -2.0d0 -1.5d0 -0.5d0 1.0d0
					    1.0d0 0.0d0 -0.5d0 -1.0d0 -.5d0)))
	(yp (make-array 20 :element-type 'double-float
			:initial-contents '(0.0d0 0.0d0 1.0d0 1.0d0 2.0d0 3.0d0 2.0d0 3.0d0
					    0.0d0 -0.5d0 -1.0d0 -1.5d0 -2.0d0 -2.0d0 -1.5d0
					    -1.0d0 -0.5d0 -1.0d0 -1.0d0 -0.5d0))))
    (declare (fixnum npol count)
	     (type (simple-array double-float (20)) xp yp))
    (dotimes (i 100000)
      (if (pnpoly npol xp yp 0.5d0 0.5d0) (incf count))
      (if (pnpoly npol xp yp 0.5d0 1.5d0) (incf count))
      (if (pnpoly npol xp yp -0.5d0 1.5d0) (incf count))
      (if (pnpoly npol xp yp 0.75d0 2.25d0) (incf count))
      (if (pnpoly npol xp yp 0.0d0 2.01d0) (incf count))
      (if (pnpoly npol xp yp -0.5d0 2.5d0) (incf count))
      (if (pnpoly npol xp yp -1.0d0 -0.5d0) (incf count))
      (if (pnpoly npol xp yp -1.5d0 0.5d0) (incf count))
      (if (pnpoly npol xp yp -2.25d0 -1.0d0) (incf count))
      (if (pnpoly npol xp yp 0.5d0 -0.25d0) (incf count))
      (if (pnpoly npol xp yp 0.5d0 -1.25d0) (incf count))
      (if (pnpoly npol xp yp -0.5d0 -2.5d0) (incf count)))
    (princ "Count ") (princ count)
    count))