Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Server side computational suggestion

by tirwhan (Abbot)
on Mar 09, 2010 at 19:24 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: Server side computational suggestion
by roboticus (Chancellor) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://827613]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-03-28 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found