Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Server side computational suggestion

by tirwhan (Abbot)
on Mar 09, 2010 at 19:24 UTC ( #827613=note: print w/ replies, xml ) Need Help??


in reply to Server side computational suggestion

Try it out. Implement the entire site in Perl, then find out which parts are taking too long. Then see whether you can find a faster Perl solution (maybe PDL is suitable for your problem space) or whether you need to reimplement parts in another language. Embedding C finctions into a Perl module is documented well enough that it should be easily possible to change the number-crunching aspects of even a complex app from one to the other.

This gives you a working (albeit possibly too slow) solution in the minimum period of time, and you can improve the parts that need improving as you go. At worst (if for some unlikely reason it turns out you need to do the entire site in C or C++), the initial Perl solution is a good prototype. You always learn when you do something for the first time, and Perl is well suited for rapid prototyping.


All dogma is stupid.


Comment on Re: Server side computational suggestion
Download Code
Re^2: Server side computational suggestion
by roboticus (Canon) on Mar 09, 2010 at 22:02 UTC

    Just to amplify on what tirwhan said: Get the job done before making it faster. Often, you'll find that it'll be fast enough. When it isn't, you'll often find that:

    1. Adding CPU/RAM/DISK/whatever may be cheaper than coding time.
    2. Improving the algorithm may be enough to make the system fast enough without recoding in a new language.
    3. Your processing time may be dominated by I/O time, making the language you choose irrelevent.

    Back in the old days, I often hand-optimized code in assembler or C to make it fast enough. Now I rarely find the need. I frequently do some serious processing on fairly large files, and the processing time is small compared to the I/O time. So it would be faster in my case to get faster boxes of disks rather than spend any time on updating algorithms, translation, etc.

    ...roboticus

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2014-07-23 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls