On Mon, Jul 07, 2003 at 03:19:46PM +0100, Andy Wardley wrote:
> Toby Corkindale wrote:
> > I'm not convinced Perl is the best language to implement such things.
> 
> Why not?  Performance concerns or something else?

My experience has been that perl stops performing adequately once you're
trying to do math operations over very large quantities of data.
I'm comparing this to C or C++.

memory usage per-node is much higher, and the time taken to run the math over
the node is quite a bit longer. (this vagueness is qualified a bit below)

One could write the main bits in C anyway and get to it from Perl via XS,
though. But I'd probably just stick to C or C++ all the way in that case.
</heretical>

> That's a serious question by the way, not just me being provocative.
> 
> A cow-orker of mine has just implemented a gesture (as in pen stroke, 
> not "up yours matey" or "swivel on this") recognition net in Ruby and
> it seems to be doing the job most admirably.  Quick to implement, 
> fast enough to run.
> 
> Now I realise Perl isn't Ruby, but they're close enough to be compared
> side-by-side against say, C, C++ or Java.

Well, no, actually. There's a significant difference in runtime between the
same program written in Perl or C. Not really distinguishable to the naked eye
until you start scaling up, though.

if you don't need to run huge neural nets, or many recognitions per second,
then you're probably fine to go for Perl/Ruby/java/etc.
Or if someone else has already written an xs interface to a C NN library, then
bonus! :)

-Toby

-- 
Turning and turning in the widening gyre
The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold;
Mere anarchy is loosed upon the world.

Reply via email to