haipart bug



>>>>> "Andreas" == Andreas Eder <Andreas.Eder@t-online.de> writes:

    Andreas> Yes, this works better!
    Andreas> I didn't look very close, because the other definition seemed clearer
    Andreas> to me.

Now that I understand what haipart does, yes, the ldb version is
easier to understand.

    >> What does haipart mean anyway?  What is it really supposed to do?

    Andreas> I did only a little bit of performance testing on cmucl 18e and that
    Andreas> showed that indeed the above version of haipart is roughly 30% faster.

This surprises me a bit since I'm pretty sure the ldb's get source
transformed to the code in the current version.  (Hmm, if not, maybe a
declaration that integer is an integer will make that transformation
happen.)

There's a few other silly things in clmacs too like

(defun zl-remove (item list &optional (n most-positive-fixnum))
  #+lucid (setq n 16777214) ;;yukkk.
  #+(or cmu sbcl) (setq n (min n (1- most-positive-fixnum))) ; yukkk
  (remove item list :count n :test 'equal))

This is the same as

(defun zl-remove (item list &optional n)
  (remove item list :count n :test 'equal))

    Andreas> I'm working on primep. But I'm not content with pseudoprimality, so
    Andreas> implementing a fast primep test will still take some time.

What is primep supposed to do for large numbers?

Ray