Defstruct and Defclass as macros
The SBCL version (macroexpand-1 '(defstruct spoint (x y))) (PROGN (SB-KERNEL:WITH-SINGLE-PACKAGE-LOCKED-ERROR (:SYMBOL 'SPOINT "defining ~…
2 posts
The SBCL version (macroexpand-1 '(defstruct spoint (x y))) (PROGN (SB-KERNEL:WITH-SINGLE-PACKAGE-LOCKED-ERROR (:SYMBOL 'SPOINT "defining ~…
I created a million instances of each (the structure spoint, and the class point), with randomized members, and the former took about 50 milliseconds, while the latter took about 100 milliseconds. Wit…