Steel Bank Common Lisp

Detect circular lists in LENGTH

Reported by Paul Khuong on 2013-04-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Wishlist
Unassigned

Bug Description

It would be nice LENGTH of lists could detect circular lists. Currently, we have assembly VOPs to compute LENGTH (… really). It seems to me we could make everything simpler by instead calling to a regular CL function (e.g. %list-length) via a deftransform. There doesn't even have to be a huge penalty to detect circular lists: we can easily call out to CL:LIST-LENGTH once the length is greater than a couple thousand conses.

Paul Khuong (pvk) on 2013-04-21
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers