|We don't bite newbies here... much|
Re^3: Efficient walk/iterate along a stringby BrowserUk (Pope)
|on Nov 23, 2010 at 13:29 UTC||Need Help??|
True, but the extra opcode (length) imposes a 30% hit.
Of course that diminishes if you're doing anything useful within the loop, but it is still significant for those situations where using such an obscure mechanism is worth considering.
Luckily, genomic data doesn't usually contain zeros or nulls.
I think it would be really nice if in the same way that in 5.12 you can use each on arrays, it would be nice to use it on scalars:
I think that could be made very efficient by aliasing a LvTARG to the characters in situ; and would be very useful.
IMO far more useful than the single character saving of each $arrayRef; over each @$arrayRef, which unfortunately probably means that it could not now be implemented :(
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.