View Full Version : when is too long too long?
EscapeCharacter
03-19-2002, 02:41 AM
when is a perl program gotten to the point where is would be more efficient to rewrite the code in a faster language? ive been working on one for a couple months and its nearing 1000 lines and im starting to notice it getting slower(probably due to my nasty code), so when is enough enough?
GnuVince
03-19-2002, 06:04 PM
Eric S. Raymond says that beyond 100 lines, Perl starts to get sluggish and hard to maintain.
EscapeCharacter
03-19-2002, 08:29 PM
Originally posted by GnuVince
Eric S. Raymond says that beyond 100 lines, Perl starts to get sluggish and hard to maintain.
if thats true than im way over due to swtich to c
recluse
03-23-2002, 02:31 PM
Ehh, it just depends on how efficient you are with your algorithms. :p
MattD
03-31-2002, 12:00 AM
Depends on what your doing, and how your doing it.
ive done stuff thats 4k+, no one's bitched about performance yet :) theres a few articles floating around on some of the
gotchas with perl performance (mainly in the regex area)
and yes, perl can be a bitch to maintain.. just need to get
people to use a standard, and be very very strict about it... :)
anyway, as far as performance is concerned, you could allways just get a bigger box :)
Matt D
stuka
09-29-2003, 04:34 PM
/me looks for the '10 lines' option...
Strike
09-29-2003, 05:51 PM
At the shebang line.
Whiteknight
01-10-2004, 01:51 AM
i'm of the mindset that perl is best for short, single goal functions, especially simple file I/O or string manipulation tasks. what i find i like to do is to use a C program to call short perl scripts when one is more usefull then the other.
basically, if the script gets longer then a single screen full of text, I either move to a different language, or rewrite my algorithem.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.