Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Benchmarks aren't everything

by schweini (Friar)
on Oct 24, 2005 at 20:19 UTC ( #502574=note: print w/replies, xml ) Need Help??


in reply to Benchmarks aren't everything

Impressive write-up!

But it got me wondering whether there is any way to disable all that funky checking the perl regexp engine does?
In most cases, I use rather basic regexps, so I think it would be great if there'd be an option like:
local $regexp_checking = undef
or something like that.
Additionaly, is there any way to use different regexp-engines? I seem to recall that in some perldoc (the Camel book, maybe?) it mentioned something about the possibility to roll one's own regexp engine, but I never noticed anyone actually doing that.
Anyhow, wouldn't it be nice if there was a way do easily choose between different engines?

Replies are listed 'Best First'.
Re^2: Benchmarks aren't everything
by Perl Mouse (Chaplain) on Oct 25, 2005 at 08:55 UTC
    Anyhow, wouldn't it be nice if there was a way do easily choose between different engines?
    Yeah, but since there isn't an alternative engine available, and I've never seen anyone attempting to write an alternative regexp engine for Perl, it doesn't make sense to put effort into making switching regexp engines easy.

    Write an alternative engine, and I'll bet someone will make a pragma to switch between them. That happened with 'sort' as well. After making merge sort available for Perl, the sort pragma was created.

    Perl --((8:>*

      Write an alternative engine, and I'll bet someone will make a pragma to switch between them.

      Actually afaiui the latter issue is the problem. We already have a framework for "swapping out" the normal regex engine via the use re 'debug'; facility. The problem is that the framework more or less expects the swapped in engine ot behave just the same as the one swapped out. IE, it must set the same globals, and behave in the same quirky way. If this problem could be cleaned up providing an alternative engine would probably be feasable.

      ---
      $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://502574]
help
Chatterbox?
[marto]: and this is a bank you say?
[hippo]: Yary: There are a few useful pointers in I need perl coding standards
[hippo]: ... and a boatload of good stuff in On Coding Standards and Code Reviews
[Yary]: Looking at system pm's, looks like it's "package" on the first line, then POD, then "use 5.xyz;use strict; use warnings; use modules..."
[Yary]: ah thanks for those links
[hippo]: Just bear in mind that all such ideas are subjective.
[choroba]: There might be a different standard at the shop you write the code for.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2018-01-23 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (250 votes). Check out past polls.

    Notices?