in reply to when to c, when to perl
Rule of thumb: code it in Perl. If it's fast enough, job done. If it's too slow, profile then either fix the algorithm, or push the slow bits into C using XS.
Perl is very fast for prototyping, and if the result is fast enough then you can spend the time you saved tossing back beers or whatever. Very often you can stick with Perl for the vast majority of the code and concentrate on speeding up the bottle neck chunks in C and still have time to swill a few beers at the end of the day. Even if you end up rewriting most or all of the code in C, at least you have a good tested prototype to work from.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: when to c, when to perl
by massa (Hermit) on Jul 25, 2008 at 11:40 UTC | |
by GrandFather (Saint) on Jul 25, 2008 at 19:13 UTC |