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

Fast Print using print function

by sathishselvam (Initiate)
on Jun 11, 2013 at 07:41 UTC ( #1038212=perlquestion: print w/ replies, xml ) Need Help??
sathishselvam has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I want to print/append the data (around 5 lakh record) in one new file using "print" function in PERL. is there any other way to speed up the print statement or any other utitilies available? now i'm using following method. Thanks in advance.

print $de_input "\nTarget Custom Groups:$target_section\n"

Comment on Fast Print using print function
Download Code
Replies are listed 'Best First'.
Re: Fast Print using print function
by davido (Archbishop) on Jun 11, 2013 at 08:58 UTC

    print is a general solution designed with simplicity in mind. It's about as fast as it can be while still maintaining its level of generality and simplicity of use. If we knew more about your specific needs and issues, we might be able to recommend a solution that is more appropriate for those specifics.

    Are you certain that print is your bottleneck? It's possible that it is, as IO is always a "usual suspect", but profiling might alert you to other areas you can focus on where there is more room for improvement.


Re: Fast Print using print function
by vinoth.ree (Prior) on Jun 11, 2013 at 08:30 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038212]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2015-11-29 11:39 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls