---------------------------------------------- Welcome to Strawberry Perl PDL Edition! * URL - http://strawberryperl.com + http://pdl.perl.org * to launch perl script run: perl c:\my\scripts\pdl-test.pl * to start PDL console run: pdl2 * to update PDL run: cpanm PDL * to install extra module run: cpanm PDL::Any::Module or if previous fails: ppm PDL::Any::Module * or you can use dev tools like: gcc, g++, gfortran, gmake * see README.TXT for more info ---------------------------------------------- Perl executable: C:\berrybrew\strawberry-perl-5.30.1.1-64bit-PDL\perl\bin\perl.exe Perl version : 5.30.1 / MSWin32-x64-multi-thread PDL version : 2.019 C:\berrybrew\strawberry-perl-5.30.1.1-64bit-PDL>pdl2 Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at C:/berrybrew/strawberry-perl-5.30.1.1-64bit-PDL/perl/vendor/lib/Term/ReadLine/readline.pm line 410. load_rcfile: got $HOME = C:\berrybrew\strawberry-perl-5.30.1.1-64bit-PDL\data load_rcfile: loading PDL/default.pdl Perldl2 Shell v0.008 PDL comes with ABSOLUTELY NO WARRANTY. For details, see the file 'COPYING' in the PDL distribution. This is free software and you are welcome to redistribute it under certain conditions, see the same file for details. Loaded plugins: CleanErrors Commands Completion CompletionDriver::INC CompletionDriver::Keywords CompletionDriver::LexEnv CompletionDriver::Methods DDS FindVariable History LexEnv MultiLine::PPI NiceSlice PDLCommands Packages PrintControl ReadLineHistory Type 'help' for online help Type Ctrl-D or quit to exit Loaded PDL v2.019 pdl> pdl> $PDL::BIGPDL = 1 pdl> use Time::HiRes 'time'; *t = \&time pdl> @d=(500,500,500) # 8 GB RAM here, let's avoid swapping pdl> pdl> $t=t; $x=zeroes@d; $y=ones@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.2526330947876 pdl> $t=t; $x=zeroes@d; $y=ones@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.69825196266174 pdl> $t=t; $x=zeroes@d; $y=ones@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.59618711471558 pdl> p $z2->info PDL: Double D [500,500,500] pdl> pdl> $t=t; $x=zeroes double,@d; $y=ones double,@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.64064288139343 pdl> $t=t; $x=zeroes double,@d; $y=ones double,@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.6656858921051 pdl> $t=t; $x=zeroes double,@d; $y=ones double,@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.68068408966064 pdl> pdl> $t=t; $x=zeroes float,@d; $y=ones float,@d; $z=$x+$y; $z2=$x/$y; p t-$t 1.11372804641724 pdl> $t=t; $x=zeroes float,@d; $y=ones float,@d; $z=$x+$y; $z2=$x/$y; p t-$t 0.841649055480957 pdl> $t=t; $x=zeroes float,@d; $y=ones float,@d; $z=$x+$y; $z2=$x/$y; p t-$t 0.83014702796936 pdl> p $z2->info PDL: Float D [500,500,500] pdl>