afterall is it not true that Deparse is not guaranteed to reconstruct things exactly
It is true that Deparse is not guaranteed to reconstruct things exactly. That's why I did use B::Concise, not B::Deparse. It prints the generated bytecode in a semi-readable way, it does not re-construct Perl code.
The bytecode isn't "supposedly" the same, it IS the same. You could use B::Bytecode to get the raw bytecode (Can't paste because of its binary format), and you could use diff to check their being equivalent. Only compile-time can differ with single/double quotes, so had you benchmarked eval q/$foo = 'foo'/ versus eval q/$foo = "foo"/, you could have gotten some difference. Run-time can, as far as I can see with all the nice tools that let you dig into the generated bytecode, not be different for "foo" versus 'foo', unless when they're evaluated in different circumstances. A load of 0.00 does not mean your system is doing absolutely nothing, as the number is the _average_ number of instructions waiting in a _queue_. If your system is capable of handling simple instructions immediately, you can have a somewhat loaded system with a 0.00 "load average" number.
This indeed does not give any information as to why you got these strange - and as far as I can test impossible - results, but as all my tests (and not only mine) on different systems tell me that "foo" versus 'foo' is a tie, I think you shouldn't trust your benchmark results. Have you been benchmarking using eval STRING, or anything else that makes difference on run-time?
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
-
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.
|