Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

If you read my post you'll see I added the "no $" after the original post. Ignoring those cases the single quote wins. You can blame the extra character if you want but i beleive that is the whole point here. If you use double quotes then you have to escape characters and it makes a noticable difference in speed. You should also have noticed that I mentioned the speed gain is minimal at very best. There is no reason at all to use these speed tests in a design choice.

for the rest because processing a backslash in a double quoted string means checking more cases than in a single quoted string. Isn't that realy the point that I was showing. Double quotes ARE slower because of the restrictions they impose, but they are only slower if it actualy contains something that needs escaped. Is that speed difference important? I would say not in normal use, but maybe for some special case.


___________
Eric Hodges

In reply to Re^5: To Single Quote or to Double Quote: a benchmark by eric256
in thread To Single Quote or to Double Quote by NateTut

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? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-03-28 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (66 votes). Check out past polls.

    Notices?