+
+(deftransform fill ((sequence item) (simple-base-string base-char) *
+ :policy (>= speed space))
+ (let ((value (if (constant-continuation-p item)
+ (let* ((char (continuation-value item))
+ (code (sb!xc:char-code char)))
+ (logior code (ash code 8) (ash code 16) (ash code 24)))
+ `(let ((code (sb!xc:char-code item)))
+ (logior code (ash code 8) (ash code 16) (ash code 24))))))
+ `(let ((length (length sequence))
+ (value ,value))
+ (multiple-value-bind (times rem)
+ (truncate length 4)
+ (do ((index sb!vm:vector-data-offset (1+ index))
+ (end (+ times sb!vm:vector-data-offset)))
+ ((= index end)
+ (let ((place (* times 4)))
+ (declare (fixnum place))
+ (dotimes (j rem)
+ (declare (index j))
+ (setf (schar sequence (the index (+ place j))) item))))
+ (declare (optimize (speed 3) (safety 0))
+ (type index index))
+ (setf (%raw-bits sequence index) value))))))