logo       

CVS: sbcl/src/compiler/generic vm-tran.lisp,1.27,1.27.2.1: msg#00207

Subject: CVS: sbcl/src/compiler/generic vm-tran.lisp,1.27,1.27.2.1
Update of /cvsroot/sbcl/sbcl/src/compiler/generic
In directory sc8-pr-cvs1:/tmp/cvs-serv19921/src/compiler/generic

Modified Files:
      Tag: vector_nil_string_branch
        vm-tran.lisp 
Log Message:
0.8.0.78.vector-nil-string.3:
        Fix most of the performance problem
        ... transforms for HAIRY-DATA-VECTOR-{REF,SET} on SIMPLE-STRING

Right.  The all-important "compile sbcl" benchmark is now back to about 
where it was (57 minutes on my laptop).  There are still correctness 
issues to deal with, not least 
  (sxhash (make-array 5 :element-type nil)) 
but this path isn't proving ridiculously expensive.


Index: vm-tran.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/generic/vm-tran.lisp,v
retrieving revision 1.27
retrieving revision 1.27.2.1
diff -u -d -r1.27 -r1.27.2.1
--- vm-tran.lisp        10 Jun 2003 11:08:13 -0000      1.27
+++ vm-tran.lisp        23 Jun 2003 08:46:05 -0000      1.27.2.1
@@ -41,6 +41,15 @@
 
 ;;;; simplifying HAIRY-DATA-VECTOR-REF and HAIRY-DATA-VECTOR-SET
 
+(deftransform hairy-data-vector-ref ((string index) (simple-string t))
+  (let ((ctype (continuation-type string)))
+    (if (array-type-p ctype)
+       ;; the other transform will kick in, so that's OK
+       (give-up-ir1-transform)
+       `(typecase string
+         ((simple-array character (*)) (data-vector-ref string index))
+         ((simple-array nil (*)) (data-vector-ref string index))))))
+
 (deftransform hairy-data-vector-ref ((array index) (array t) * :important t)
   "avoid runtime dispatch on array element type"
   (let ((element-ctype (extract-upgraded-element-type array)))
@@ -93,6 +102,18 @@
         (data-vector-set array
                          index
                          new-value)))))
+
+(deftransform hairy-data-vector-set ((string index new-value)
+                                    (simple-string t t))
+  (let ((ctype (continuation-type string)))
+    (if (array-type-p ctype)
+       ;; the other transform will kick in, so that's OK
+       (give-up-ir1-transform)
+       `(typecase string
+         ((simple-array character (*))
+          (data-vector-set string index new-value))
+         ((simple-array nil (*))
+          (data-vector-set string index new-value))))))
 
 (deftransform data-vector-set ((array index new-value)
                                (simple-array t t))



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe