Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Suggestions for optimizing this code...

by BrowserUk (Patriarch)
on Jan 16, 2006 at 23:50 UTC ( #523633=note: print w/replies, xml ) Need Help??


in reply to Suggestions for optimizing this code...

Do you need random access to the lines or are you just going to iterate over the array once from beginning to end?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: Suggestions for optimizing this code...
by NeilF (Sexton) on Jan 17, 2006 at 11:26 UTC
    I do need that array... Maybe what I'll do is read buffered, but write using syswrite. All I'd have to do then is replace:-

    open DF,">test.txt"; print DF @test; close DF;


    with:-

    sysopen(DF,"test.txt", O_WRONLY | O_CREAT); syswrite DF,join('', @test); close DF;


    At least then the IO Processes for writing are down to 1!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-06-25 04:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (81 votes). Check out past polls.

    Notices?