From kostas at cs.sunysb.edu Thu Nov 11 12:40:29 2004 From: kostas at cs.sunysb.edu (Kostas Pentikousis) Date: Thu Nov 11 12:41:35 2004 Subject: [sb.pm] Perl Compiler (fwd) Message-ID: Hi Andrew, It pretty much depends on what exactly you're doing. After a quick search I have a couple of links for you: Optimize Perl http://www-106.ibm.com/developerworks/library/l-optperl.html A Fresh Look at Efficient Perl Sorting http://www.sysarch.com/perl/sort_paper.html Also Rob forwarded another link sometime ago: When perl is not quite fast enough http://www.ccl4.org/~nick/P/Fast_Enough/ Best regards, Kostas __________________________________________________________________ Kostas Pentikousis www.cs.stonybrook.edu/~kostas PS: You may want to subscribe to the sb.pm list at http://mail.pm.org/mailman/listinfo/stonybrook-pm ---------- Forwarded message ---------- Date: Thu, 11 Nov 2004 09:29:29 -0500 (EST) From: Andrew Mehler To: info@stonybrook.pm.org Subject: Perl Compiler To Perl Mongers - Hi. I'm a grad student here at stony brook. I am looking to speed up some perl code. What is the best way to compile perl code for speed? Thanks, Andrew Mehler From jkeen at verizon.net Fri Nov 12 17:55:40 2004 From: jkeen at verizon.net (James Keenan) Date: Fri Nov 12 17:54:28 2004 Subject: [sb.pm] Re: Perl Compiler In-Reply-To: <200411121801.iACI19xg024760@www.pm.org> References: <200411121801.iACI19xg024760@www.pm.org> Message-ID: <5B68274C-3506-11D9-A3C2-000D932B9CD4@verizon.net> > Date: Thu, 11 Nov 2004 13:40:29 -0500 (EST) > From: Kostas Pentikousis > Subject: [sb.pm] Perl Compiler (fwd) > To: Andrew Mehler > Cc: Stony Brook Perl Mongers > Message-ID: > Content-Type: TEXT/PLAIN; charset=US-ASCII > > Hi Andrew, > > It pretty much depends on what exactly you're doing. After a quick > search I have a couple of links for you: > > Optimize Perl > http://www-106.ibm.com/developerworks/library/l-optperl.html > FWIW: You should note that this article has been subjected to some scorching criticisms on comp.lang.perl.misc starting on 10/23/04. Here, for example, is what Uri Guttman (author of one of the other recommended articles) wrote: "so many misconceptions about perl that i can't even start. and he misses so many ways to optimize perl as well. no mention of the Benchmark.pm module. perl bytecode is generally useless and doesn't give much speedup choosing a better algorithm and/or data structure is the best way to optimize code in any language. if you think perl 's speed is the problem then you either chose the wrong language or don't know how to code perl efficiently. examining bytecode is silly in this context. it still won't show you which ops are the bottlenecks. the speed difference between single and double quoted strings is negligible. try a benchmark yourself. double quoted strings are converted to a join of the string parts at compile time so there is no runtime loss for simple strings." > When perl is not quite fast enough > http://www.ccl4.org/~nick/P/Fast_Enough/ Heard that talk. Recommend it. Jim Keenan From Dysfunction292 at aol.com Sat Nov 13 17:32:09 2004 From: Dysfunction292 at aol.com (Dysfunction292@aol.com) Date: Sun Nov 14 01:03:02 2004 Subject: [sb.pm] a newbie perl user Message-ID: <6824B8B0.150EA011.CF462F4F@aol.com> hi my name is Tom i live in Ronkonkoma and just bought O'reilly's "learning perl 3rd edition" i am in my senior year in high school and want to take computer science when i go to college, i have zero experiance in programming but a ton in computers, i have my A+ cert, i downloaded active perl for my windows xp pro machine at home and zues text editor, i started writing some progs but i can't get them to run as a executible, just a text, is there someting else i have to download or do From jkeen at verizon.net Sun Nov 14 13:55:05 2004 From: jkeen at verizon.net (Jim Keenan) Date: Sun Nov 14 13:55:11 2004 Subject: [sb.pm] Re: a newbie perl user Message-ID: <20041114195505.GBJV22336.out002.verizon.net@outgoing.verizon.net> > Date: Sat, 13 Nov 2004 18:32:09 -0500 > From: Dysfunction292@aol.com > Subject: [sb.pm] a newbie perl user > > hi my name is Tom i live in Ronkonkoma and just bought O'reilly's "learning perl 3rd edition" i am in my senior year in high school and want to take computer science when i go to college, i have zero experiance in programming but a ton in computers, i have my A+ cert, i downloaded active perl for my windows xp pro machine at home and zues text editor, i started writing some progs but i can't get them to run as a executible, just a text, is there someting else i have to download or do > > You have made a good choice in programming language, introductory text, and version of Perl for Win32. Additional resources: the 'perl-beginners' mailing lists @ groups.yahoo.com and @ perl.org, respectively. Given Perl program 'C:\Temp\hello.pl' as follows: use strict; use warnings; print "Hello world!\n"; You can run it in either of two ways: perl C:\Temp\hello.pl or cd C:\Temp perl hello.pl ... i.e., (1) from anywhere on your system with the full path, or (2) from the directory where the script resides, with just the file name. Should you call the following at the command-prompt: hello.pl ... and the program opens in your text editor, *that's probably a good thing*! The alternative -- having the Perl script launch and execute -- is, in my 4+ years of Perl on Windows, less useful. You'll be editing your Perl scripts with your text editor much more often than running them. Similarly, when I click on a '.pl' file in Windows Explorer (usually with a yellow-ball icon), I usually want it to open in my text editor. HTH Jim Keenan From jkeen at verizon.net Sun Nov 14 21:41:31 2004 From: jkeen at verizon.net (James Keenan) Date: Sun Nov 14 21:40:15 2004 Subject: [sb.pm] (no subject) Message-ID: <3D8A3D99-36B8-11D9-8ECC-000D932B9CD4@verizon.net> In case you're in New York City on Tuesday night, check out Perl Seminar NY. Our November 16 meeting will feature a talk by Marc Prewitt on CPAN module Text::Template, whose author is Mark Jason Dominus. Marc P. has provided this description: "Template modules help generate letters, build HTML pages and perform 'mail merge' functionality. Most template modules invent a special language for substitutions, formatting and looping. Text::Template templates are programmed in perl, a language you already know and love. This talk explains how Text::Template works and some of the pros and cons of using it." Have you used Text::Template? If so, bring examples of how you have used it to the meeting and we'll discuss them after Marc makes the main presentation. As always we will meet at: NYPC User Group 481 8 Avenue (Ramada New Yorker hotel) Suite 1560 between 34th & 35th Sts, Manhattan, right near Penn Station Tuesday, November 16, 6:15-8:15 pm From kostas at cs.sunysb.edu Thu Nov 18 12:53:40 2004 From: kostas at cs.sunysb.edu (Kostas Pentikousis) Date: Thu Nov 18 12:55:03 2004 Subject: [sb.pm] Re: Perl Compiler (fwd) In-Reply-To: References: Message-ID: On Thu, 18 Nov 2004, Andrew Mehler wrote: |Thanks. That helped some. Our code still seems to be taking a while. We |aren't really that experienced in Perl. Perhaps there is something |obvious we are doing wrong. If you can find any obvious mistakes, it |would be appreciated. Hm... a code review :) Maybe that is an excellent idea for our next meeting... which will be happening as soon as am I done with the thesis (i.e. just after Tnxgiving) For now, and before other SB perl mongers chime in, try to use warnings; # in addition to use strict use Getopt::Std; # or Getopt::Long if you please use Regexp::Common # see http://search.cpan.org/dist/Regexp-Common/ that can clean up the code a bit, so you will be able to focus on the core of the app. Incremental improvements work best for me, esp. as I learn more Perl. Best regards, Kostas __________________________________________________________________ Kostas Pentikousis www.cs.stonybrook.edu/~kostas