I sent a nice email that suggests using PDL for comparisons between scripting languages in the introductory lecture.
Demian On Mon, Nov 18, 2013 at 3:39 AM, Craig DeForest <[email protected]>wrote: > Wow, I had a look at his slides, and although the rest of the course seems > pretty good he clearly misses the boat with Perl. He calls it out > specifically as being difficult to work with for codes longer than about > 100 lines, which is manifestly not the case. Worse, as you (Demian) > pointed out, he underestimates the speed of Perl by a lot. By a factor of > about 3,000, in fact -- I benchmarked the codes in his slides, and the > PDLPP snippet performs only 1.8x slower than C for his example, compared to > Python at about 75x slower than C and his pure-Perl "solution" at about > 5,000x slower. > > On Nov 17, 2013, at 5:19 PM, Craig DeForest <[email protected]> > wrote: > > Here's a mandel.pdl suitable for autoloading. Try it like this (or > substitute your favorite plotting commands): > > $locs = (ndcoords(1000,1000)/500 - 1)/3000 + pdl(0.748973,0.0570852); > $foo = mandel($locs,2000); > $w=gpwin(x11,size=>[9,9]); > $w->image($locs->using(0,1),$foo->sqrt,{j=>1,title=>"Cool!"); > > <mandel.pdl> > > On Nov 17, 2013, at 4:33 PM, Derek Lamb <[email protected]> wrote: > > Xavier Calbet did this about 6 years ago (but did not use a Python > comparison) > > > http://www.freesoftwaremagazine.com/articles/cool_fractals_with_perl_pdl_a_benchmark > > Yes, if that python example uses scipy, then by not using Perl's > equivalent (PDL), there should be no surprise that Perl is 70x slower! > > cheers, > Derek > > On Nov 17, 2013, at 1:10 PM, Demian Riccardi wrote: > > Hello everyone! > > While cruising the web for who knows what, I found this: > > http://www.physics.rutgers.edu/grad/509/Intro0.pdf > > which are slides from the first class of a computational physics course at > Rutgers. There's a little language comparison and a calculation of the > Mandelbrot Set using Fortran, C++, Perl (with Math::Complex), and Python > (with numpy/scipy, which is the main language for the course it seems). > Perhaps it would be nice if someone sent some awesome PDL code for the > Prof to replace in the introduction so at least the comparison is fair > (slide 35)? I'd do it, but I'm swamped, and still not using PDL enough for > it to be the most beautiful ever (which it should be for this). > > Demian > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > > > >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
