From: Nikodemus S. <nik...@ra...> - 2011-02-10 21:21:45
|
I've extended SBCL's optimized constructors (the thing that makes MAKE-INSTANCE fast) to cover more cases. 1. Classes whose slots need (SETF SLOT-VALUE-USING-CLASS) or SLOT-BOUNDP-USING-CLASS. 2. Classes with INITIALIZE-INSTANCE :AROUND methods. Basically, now optimized constructors can be used unless - there is a custom MAKE-INSTANCE method on the metaclass - there are methods on ALLOCATE-INSTANCE - there are slots with allocation other than :INSTANCE or :CLASS - there are non-constant initargs -- that is (make-instance 'foo (some-key) ...) - there is a non-standard primary method on INITIALIZE-INSTANCE - there is an :AROUND, or a non-standard primary method on SHARED-INITIALIZE The patches are at https://github.com/nikodemus/SBCL on the "pending" branch. Unless horrifying bugs are discovered, I will commit them once the CVS comes back up. If you have an application where you used to see MAKE-INSTANCE or FAST-MAKE-INSTANCE is SB-SPROF output, I would be interested in hearing how much of a difference this makes for you. Cheers, -- Nikodemus |