LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (May 2005, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 May 2005 20:02:05 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: help on macro
Comments: To: nospam@HOWLES.COM, radevenz@ix.netcom.com
In-Reply-To:  <MC8-F179NA0GufdMmMU00021f86@MC8-F17.hotmail.com>
Content-Type: text/plain; format=flowed

Howard and Richard,

It seems (as Howard mentioned) that at a million records there is a difference:

where upcase(alpha) contains "%upcase(&MatchString)" ;

Real Time 41.43 CPU Time 41.06

where upcase(alpha) contains upcase("&MatchString") ;

Real Time 55.92 CPU Time 50.95

I don't know about ya'll but ten or so seconds difference whoopieeeee, guess the SAS optimization is better than I thought. I am not sure about the scaleability but if say it is constant then unless I have to process say a billion records I don't think it really makes a big deal. Well I learned something today in any event it is off to do something that i do better than annoy Ian over macro issues that being cooking gourmet food.

Toby Dunn

From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM> To: Toby Dunn <tobydunn@HOTMAIL.COM> Subject: Re: help on macro Date: Tue, 10 May 2005 15:03:57 -0400 Received: from malibu.cc.uga.edu ([128.192.1.103]) by MC8-F17.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 10 May 2005 12:04:03 -0700 Received: from listserv.cc.uga.edu (128.192.1.75) by malibu.cc.uga.edu (LSMTP for Windows NT v1.1b) with SMTP id <2.00F5799D@malibu.cc.uga.edu>; Tue, 10 May 2005 15:03:57 -0400 X-Message-Info: JGTYoYF78jFCgn0FGSUA7e3uGIcHyzXKAHNjC1bsRoE= Return-Path: nospam@HOWLES.COM X-OriginalArrivalTime: 10 May 2005 19:04:04.0273 (UTC) FILETIME=[08991210:01C55593]

You need a bigger test file (like a million, or several).

On Tue, 10 May 2005 18:16:02 +0000, toby dunn <tobydunn@HOTMAIL.COM> wrote:

>Richard, > >I ran a test with 6000 obs. here are the numbers: > > >where upcase(alpha) contains "%upcase(&MatchString)" ; > >took 0.70 real time > 0.30 CPU time > > >where upcase(alpha) contains upcase("&MatchString") ; > >took 0.29 real time > 0.29 CPU time > >Isn't that weird I figured the second way would take slightly more time than >the first. But after triple checking my numbers and making sure noi cacheing >was taking place its what I get on my machine. > > >Toby Dunn > > > > >From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM> >Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: help on macro >Date: Tue, 10 May 2005 13:00:39 -0400 > >toby dunn wrote: > > Hawk_eye, > > > > %macro TestLike(DsnOut = , DsnIn = , MatchString = ) ; > > > > data &DsnOut ; > > set &DsnIn ; > > where upcase(alpha) contains upcase("&MatchString") ; > > run ; > > > > %mend ; > >Not knowing the what/when/wherefores of the SAS compiler optimizations, I >would not give SAS the chance to huff and puff on the second upcase on every >row. > > where upcase(alpha) contains "%upcase(&MatchString)" ; > >-- >Richard A. DeVenezia


Back to: Top of message | Previous page | Main SAS-L page