Ok, what would you have me benchmark? Why don't you do it yourself?
Update:
If you need access to a complete hash, it is completely clear that returning a reference to a hash which has been created already is much more efficient than causing the hash to be re-created from a list. If you claim that is not true, then you need to provide some benchmarks yourself! That duck just doesn't fly.
I guess we are talking about returning ONLY the keys from a hash table, that which is created in a sub? Or what? The sub can make a list of those keys itself or it can pass a ref to its internal hash for the calling sub to do the same. That computational effort will be similar.
What are you talking about? What kind of benchmark do you propose?
-
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.
|