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

Re^2: Null-stripping performance

by Thelonius (Priest)
on Feb 26, 2007 at 14:37 UTC ( #602130=note: print w/replies, xml ) Need Help??

in reply to Re: Null-stripping performance
in thread Null-stripping performance

On my PC, The "substr(), y" method takes about 0.6 microseconds, the "substr(), s" method takes about 1 microsecond, the "unpack x$index" method takes about 2 microseconds.

The "unpack a$index" method takes about 41 microseconds (when averaged over a 262000 byte string), so it's the one to avoid. It has to allocate the large substring it skips over before it throws it away.

Replies are listed 'Best First'.
Re^3: Null-stripping performance
by qiau (Initiate) on Feb 26, 2007 at 17:19 UTC
    Thanks a lot. I really appreciate your help! I can mention, as a parenthesis, that this code is going to run in sparc solaris-environment. When I tried the script at my PC perl took care of the null's by itself and just the substr worked fine. I guess I have to live with the time it takes to do it "substr(),y"-way. Thanks again

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602130]
[LanX]: I see
[marinersk]: I appear to be unusually dependent on spacial stability. I have had trouble from someone moving an object a mere four inches to the left.
[Eily]: I think the solution is to write posts so brilliant that you gain XP on each refresh, no matter how often :P
[marinersk]: Eily++ and LOL
[marinersk]: I get a lighter version of this disconcertion (new word?) when the n points remaining until rank disappears.
[choroba]: :-D
[marinersk]: I've often marvelled over the past few decades at just how little it takes to mess me up with this spacial dependence thing. I wonder if I'm mildly autistic or something.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (9)
As of 2017-05-29 13:57 GMT
Find Nodes?
    Voting Booth?