Changeset 16368


Ignore:
Timestamp:
Apr 20, 2015, 7:25:52 PM (4 years ago)
Author:
gb
Message:

REPLACE uses %UVECTOR-replace if it can.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/sequences.lisp

    r16171 r16368  
    328328                                          source-end))
    329329  (locally (declare (fixnum target-start target-end source-start source-end))
     330    (let* ((typecode (typecode source-sequence))
     331           (n (- source-end source-start)))
     332      (if (and (not (listp source-sequence))
     333               (= (the fixnum (- target-end target-start)) n)
     334               (= typecode (typecode target-sequence)))
     335        (%uvector-replace target-sequence target-start source-sequence source-start n typecode)
     336       
    330337    (seq-dispatch
    331338     target-sequence
     
    391398          (declare (fixnum target-index source-index))
    392399          (aset target-sequence target-index
    393                 (aref source-sequence source-index))))))))
     400                (aref source-sequence source-index))))))))))
    394401
    395402;;; Concatenate:
Note: See TracChangeset for help on using the changeset viewer.