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

Re: push to array without copying

by chris212 (Scribe)
on Nov 15, 2016 at 21:20 UTC ( #1175953=note: print w/replies, xml ) Need Help??

in reply to push to array without copying

I found that "printf" was not the most efficient way to format fixed-width data. It was faster to append whitespace padding or truncate with a regex as needed. Probably since it modifies the variable in-place and it doesn't need to parse a format string. This allowed me to try using an array of references, but I saw no performance improvement. I also see no performance improvement deleting the value from the hash when pushing it to an array.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1175953]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2022-08-18 02:02 GMT
Find Nodes?
    Voting Booth?

    No recent polls found