Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Why is this so slow
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael Robbins  
View profile  
 More options Jul 27 2005, 12:50 pm
Newsgroups: comp.soft-sys.matlab
From: "Michael Robbins" <michaelNOrobbinsSPAMuse...@yahoo.com>
Date: Wed, 27 Jul 2005 12:50:26 -0400
Local: Wed, Jul 27 2005 12:50 pm
Subject: [REGEXP] Why is this so slow
I'm planning on rewriting it, but it is so nice... if it weren't so
slow! Any ideas before I do?

% SEPARATE THE FUNCTIONS
regex = [
    '(?<=\n\s*)' ...
    '(?<prename>' ...
       'function\s+' ...
       '(?:\[[^\]]*\s*=\s*)?' ...
    ')' ...
    '(?<name>\w+)' ...
    '(?<postname>.*?)' ...
    '(?=\n\s*function\s+)'];
a = regexp(sprintf('\n%s\nfunction ',slurp),regex,'names');

TIA


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jason Breslau  
View profile  
 More options Jul 27 2005, 3:15 pm
Newsgroups: comp.soft-sys.matlab
From: Jason Breslau <tendiamo...@mathworks.com>
Date: Wed, 27 Jul 2005 15:15:07 -0400
Local: Wed, Jul 27 2005 3:15 pm
Subject: Re: [REGEXP] Why is this so slow
The current implementation of lookbehind in regexp is rather
inefficient.  Avoid using it if possible.  Your pattern will work fine
with that part of the expression converted to a regular group.

-=>J


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Robbins  
View profile  
 More options Jul 27 2005, 4:57 pm
Newsgroups: comp.soft-sys.matlab
From: "Michael Robbins" <michaelNOrobbinsSPAMuse...@yahoo.com>
Date: Wed, 27 Jul 2005 16:57:51 -0400
Local: Wed, Jul 27 2005 4:57 pm
Subject: Re: [REGEXP] Why is this so slow

Jason Breslau wrote:

> The current implementation of lookbehind in regexp is rather
> inefficient. Avoid using it if possible. Your pattern will work
> fine
> with that part of the expression converted to a regular group.

Thanks. I converted the regex and it works well now, though still a
little slow. It turns out there was a small bug in the one I posted
anyway.

BTW, I'm really happy with the features you've put into REGEXP. I
never understood why you wanted to reinvent the wheel but you
certainly did a good job. MATLAB is far better for it.

It'd be really great if you continued to proliferate REGEXP
throughout MATLAB and the IDE.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google