[cl-store-devel] Circularity bug

szergling senatorzergling at gmail.com
Tue Nov 20 04:13:45 UTC 2007


It seems the dump-list function (cl-store_0.8) has been written to be
fast, by cdring down a list, and storing only the car.

Assuming that 'circularity', like *print-circle*, actually means "check
for shared structure", then I don't think the code is correct, since
we have to check for seen cons cells as well as their contents.

As an example,

CL-USER 12 > (defparameter *temp* '(1 2 (a b . #1=(c d e)) 3 4 . #1#))

CL-USER 13 > (cl-store:store *temp* "c:/home/temp/delme.out")
(1 2 (A B . #1=(C D E)) 3 4 . #1#)

CL-USER 14 > (cl-store:restore "c:/home/temp/delme.out")
(1 2 (A B C D E) 3 4 C D E)

I think a user that is concerned with speed will have to either turn
off circularity checking, and/or use arrays for the sort of
performance dump-list is currently trying to achieve.

Thank you.

More information about the cl-store-devel mailing list