Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Yes, lc() is rocket fast because this only involves fiddling with one bit within a byte. C and ASM can do this very, very quickly. This is just a minor point in the OP's code. This is in a "run once" initialization loop. No optimization here will make any difference at all in terms of user perceived performance.

The OP does have a correct idea in that running a regex against all lines of the input dictionary will be so fast, that the complexity of that regex probably makes no difference at all. The idea of throwing away extraneous results that are either too long or too short in terms of number of characters also probably makes no difference.

I think the problem here is that we do not have clearly defined textual description (meaning something that a human can understand) of what the code is supposed to do! Nobody here can "fix" code that doesn't do what it is supposed to do, if we don't know what it is supposed to do in the first place!


In reply to Re^8: Problem with regex wildcard operator (.)...? by Marshall
in thread Problem with regex wildcard operator (.)...? by sbrothy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-24 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found