package-test.lisp @ c76d55908e2e

Optimize circles a bit

After reviewing some disassembly elsewhere I realized that declaring a function
to return `(values)` and adding that form actually prevents last-call
optimization, at least in SBCL.  It's a cleaner API, but it wastes lots of stack
frames.

Save the frames, kill the `(values)`.
author Steve Losh <steve@stevelosh.com>
date Mon, 11 Jul 2016 19:56:43 +0000
parents 23d4dc2900a1
children 2ce458ef85fd
(defpackage #:bones-test
  (:use
    #:cl
    #:5am
    ))

(defpackage #:bones-test.paip
  (:use
    #:cl
    #:5am
    #:bones.quickutils
    #:bones.paip)
  ; kill me
  (:shadowing-import-from #:5am
    #:fail))

(defpackage #:bones-test.wam
  (:use
    #:cl
    #:5am
    #:bones.quickutils
    #:bones.wam)
  (:import-from #:bones.wam
    #:with-database
    #:make-database
    #:with-fresh-database
    #:push-logic-frame-with
    #:rule
    #:fact
    #:facts
    #:call
    #:dump-wam-full
    #:?
    #:query
    #:query-all)
  (:shadowing-import-from #:bones.wam
    #:!))

(defpackage #:bones-test.circle
  (:use :cl :5am :bones.circle))