Date: Thu, 8 Jul 2010 12:31:13 +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: How to compress muliple decimal points
In-Reply-To: <59CF07D8-E4AC-4512-A5B4-B62908CF7B4F@gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Tom,
Yes they can in some cases be slower. The reason is one of two things, first SAS functions are already precompiled within SAS any regex will need to be sent ot the Perl dll. So it does have extra over head which means that if there is a SAS function or sometimes if you need a couple of SAS functions to accomplish the end goal they will work faster than a RegEx. Secondly, much depends on how you write the RegEx, how much back tracking are you asking it to and have you fully taken advantage of internal optimization of the RegEx engine and have you written a RegEx that will turn off the optimization. In short there is no easy answer but rather takes some testing and in teh end a whole bunch of knowledge of RegEx and the Perl RegEx Engine.
Toby Dunn
"Don't bail. The best gold is at the bottom of barrels of crap."
Randy Pausch
"Be prepared. Luck is where preparation meets opportunity."
Randy Pausch
> Date: Thu, 8 Jul 2010 18:19:38 +1200
> From: barefootguru@GMAIL.COM
> Subject: Re: How to compress muliple decimal points
> To: SAS-L@LISTSERV.UGA.EDU
>
> The Perl regular expressions in SAS can be _slow_. I was running some generated code with about 20 select...when's, each with a prxmatch call (fixed RE). I achieved about a 4x speed increase by replacing them with standard SAS functions.
>
> Pity, I rather like RE.
>
> Cheers
>
>
> On 2010-07-08, at 05:33, Dave Brewer wrote:
>
> > Toby,
> >
> > I love your one liners! Now, if only I can understand Perl expressions.
> > Looks like it's time to RTFM :=)
> >
> > Thanks much.
> > Dave
_________________________________________________________________
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5 |