- (let ((start-ticks (get-internal-ticks))
- (start-consing (get-bytes-consed))
- (*enclosed-ticks* 0)
- (*enclosed-consing* 0)
- (*enclosed-profiles* 0))
+ (let* ((start-ticks (get-internal-ticks))
+ (*enclosed-ticks* 0)
+ (*enclosed-consing* 0)
+ (*enclosed-profiles* 0)
+ (nbf-pcounter *n-bytes-freed-or-purified-pcounter*)
+ ;; Typically NBF-PCOUNTER will represent a bignum.
+ ;; In general we don't want to cons up a new
+ ;; bignum for every encapsulated call, so instead
+ ;; we keep track of the PCOUNTER internals, so
+ ;; that as long as we only cons small amounts,
+ ;; we'll almost always just do fixnum arithmetic.
+ ;; (And for encapsulated functions which cons
+ ;; large amounts, then we don't much care about a
+ ;; single extra consed bignum.)
+ (start-consing-integer (pcounter-integer nbf-pcounter))
+ (start-consing-fixnum (pcounter-fixnum nbf-pcounter)))