Changeset 13507


Ignore:
Timestamp:
Mar 9, 2010, 7:48:14 PM (10 years ago)
Author:
gz
Message:

From trunk: r13410 (faster :initial-element in make-array)

Location:
branches/working-0711/ccl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl

  • branches/working-0711/ccl/level-1/l1-utils.lisp

    r13197 r13507  
    10971097  (let ((vector (%alloc-misc size subtype)))  ; may not get here in that case
    10981098    (if initial-element-p
    1099       (dotimes (i (uvsize vector)) (declare (fixnum i))(uvset vector i initial-element))
     1099      (cond ((and (eql subtype target::subtag-simple-base-string)
     1100                  (eql initial-element #\Null)))
     1101            ((and (eql subtype target::subtag-double-float-vector)
     1102                  (eql initial-element 0.0d0)))
     1103            ((and (eql subtype target::subtag-single-float-vector)
     1104                  (eql initial-element 0.0s0)))
     1105            (t (or (eql initial-element 0)
     1106                   (%init-misc initial-element vector))))
    11001107      (if initial-contents-p
    11011108        (if (null dims) (uvset vector 0 initial-contents)
Note: See TracChangeset for help on using the changeset viewer.