flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread O. STeffen BEYer
Dear Module Authors, recently in one of the Amsterdam Perl Mongers meetings the question came up how much faster actually the XS version of Date::Calc (Date::Calc::XS) was as compared to the Pure Perl version (Date::Calc::PP). Here is the answer (see attached script - you will need to have

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread Aristotle Pagaltzis
* O. STeffen BEYer ost...@gmail.com [2009-11-18 13:10]: One can see from these results that the XS version quite consistently runs approximately about 15 times faster than the PP version. This is flame bait? Why is this flame bait? Regards, -- Aristotle Pagaltzis // http://plasmasturm.org/

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread Kartik Thakore
Maybe he thought there were a debate on XS v.s PP performance. If only we could be this flame retardent in the uneeded perl5 v.s perl6 debate. Kartik Thakore On 18-Nov-09, at 7:29 AM, Aristotle Pagaltzis pagalt...@gmx.de wrote: * O. STeffen BEYer ost...@gmail.com [2009-11-18 13:10]: One

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread O. STeffen BEYer
It might be seen as flame bait because there have been endless discussions on the Perl vs. C execution speed issue on Perl newsgroups in the past. :-) 2009/11/18 Kartik Thakore thakore.kar...@gmail.com Maybe he thought there were a debate on XS v.s PP performance. If only we could be this

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread Jonathan Yu
Steffen- As always, I think benchmarks are important. As you've shown below, in your case, the XS implementation certainly is faster. I think it all depends on whether the speed of the system is bound by external factors (like disk speed, speed of a network stream) or your CPU. Certainly I've

Re: Weekend entertainment

2009-11-18 Thread Robin Berjon
On Nov 17, 2009, at 10:36 , Jasper wrote: 2009/11/15 David Landgren da...@landgren.net: I wanted to share this... Some people have no sense of humour. This came up on the cont...@perl.org queue. Rename the offending module Nigerian419 and all the problems are solved. FWIW the OP had also

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread David Golden
On Wed, Nov 18, 2009 at 9:20 AM, Jonathan Yu jonathan.i...@gmail.com wrote: Certainly I've found for tight loops with lots of calculations, XS/C is going to be faster. Why? Because it's compiled into machine code and executed directly on the chip. On the other hand, Perl is compiled into

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread Aldo Calpini
Aristotle Pagaltzis wrote: This is flame bait? Why is this flame bait? well, if nothing else works, this could easily be turned into a Date::Calc vs. DateTime flame bait :-) cheers, Aldo

Re: flame bait: execution speed Perl vs. C (Date::Calc::PP vs. Date::Calc::XS)

2009-11-18 Thread Aristotle Pagaltzis
* David Golden xda...@gmail.com [2009-11-18 16:05]: So creating/destroying Perl objects -- even just for things like argument passing on the stack -- is part of the cost of the flexibility of Perl. When that becomes a bottleneck in a tight loop, that's when XS becomes a potential option.

Re: Weekend entertainment

2009-11-18 Thread David Landgren
David Cantrell wrote, some time around 17/11/2009 13:12: On Sun, Nov 15, 2009 at 12:51:44PM +0100, David Landgren wrote: (I shall compose a message saying Acme is fun, etc. etc. Can anyone point me to other similar Acme modules to put this in context?) Surely it would be better to just reply