Re: Installing Module::Build::Tiny from CPAN fails . . . because it requires Module::Build::Tiny!?! WTF?
Hi Brian, Very nicely explained. I suppose Perl Beginners is not the best forum for this question. I clearly didn't understand the various ways to use prove. Thanks, --Marc On Sun, Feb 16, 2014 at 10:13 AM, Brian Fraser frase...@gmail.com wrote: On Sat, Feb 15, 2014 at 10:34 PM, Marc Perry marcperrys...@gmail.comwrote: Has anyone else encountered this? I had to dig down deep in my testing lore and run 'prove -v t/simple.t' before I could find the STDERR that revealed this. When I reviewed the files in the Module, sure enough: use Module::Build::Tiny (which unfortunately I don't have and am trying to install). Surely this is a bug? Well no, it's not a bug. Step back and consider: How else is a module going to test itself, if not by using its own functions? What your prove line is missing is a -b, which, after either 'make' or './Build', will include the paths to the files the module needs in @INC. For what it's worth, M::B::T install fine for me on Android and OS X -- if you can still reproduce your build issue, it'd probably be pretty helpful to report it in the module's github page.
perl regexp performance - architecture?
I'm currently loading some new servers with CentOS6 on which perl5.10 is the standard version of perl provided. However, I've also loaded perl5.18 and I don't think the version of perl is significant in the results I'm seeing. Basically, I'm seeing perl performance significantly slower on my new systems than on my 6 year old systems. Here's some of the relevant details: + 6 year old server, 32 bit architecture, CentOS5 perl5.8 perl, and in particular regexp operations, perform reasonably fast. + Very new server, 64 bit architecture, CentOS6, perl5.10 (and have tried perl5.18) perl, and in particular regexp operations, perform significantly slower than on the 6 year old server. That struck me as odd right off. I though surely, perl running on a modern high-end cpu is going to beat out my code running on 6 year old hardware. I've compared CPU models at various CPU benchmarking sites and the new CPUs, as you would expect, are ranked significantly higher in performance than the old. I've also installed perl5.8 on the new 64bit servers and the performance is similar to that of perl5.10 and perl5.18 on the same 64bit servers. Given that, I don't think perl version plays a significant factor is the performance diffs. Is it an accepted fact that perl performance takes a hit on 64 bit architecture? I've tried comparing some of the perl -V and Config.pm results looking for significant differences. That output is pretty verbose and the most significant difference is the architecture. I could provide some of my benchmarking code if that would be of help. The differences are significant. The only reason I'm looking at this is because I could see right off that some of my code is taking 30-40% longer to run in the new environment. Once I started putting in some timing with Time::HiRes I could see the delay involved large amounts of regexp processing. Right now, I'm just looking for any opinions on what I'm seeing so that I know the architecture is the significant factor in the performance degradation and then consider any recommendations for improvements. I'm happy to provide further relevant details. Thanks, Phil
Re: perl regexp performance - architecture?
On Mon, Feb 17, 2014 at 12:41 PM, Phil Smith philbo...@gmail.com wrote: I'm currently loading some new servers with CentOS6 on which perl5.10 is the standard version of perl provided. However, I've also loaded perl5.18 and I don't think the version of perl is significant in the results I'm seeing. Basically, I'm seeing perl performance significantly slower on my new systems than on my 6 year old systems. Here's some of the relevant details: + 6 year old server, 32 bit architecture, CentOS5 perl5.8 perl, and in particular regexp operations, perform reasonably fast. + Very new server, 64 bit architecture, CentOS6, perl5.10 (and have tried perl5.18) perl, and in particular regexp operations, perform significantly slower than on the 6 year old server. That struck me as odd right off. I though surely, perl running on a modern high-end cpu is going to beat out my code running on 6 year old hardware. I've compared CPU models at various CPU benchmarking sites and the new CPUs, as you would expect, are ranked significantly higher in performance than the old. I've also installed perl5.8 on the new 64bit servers and the performance is similar to that of perl5.10 and perl5.18 on the same 64bit servers. Given that, I don't think perl version plays a significant factor is the performance diffs. Is it an accepted fact that perl performance takes a hit on 64 bit architecture? I've tried comparing some of the perl -V and Config.pm results looking for significant differences. That output is pretty verbose and the most significant difference is the architecture. I could provide some of my benchmarking code if that would be of help. The differences are significant. The only reason I'm looking at this is because I could see right off that some of my code is taking 30-40% longer to run in the new environment. Once I started putting in some timing with Time::HiRes I could see the delay involved large amounts of regexp processing. Right now, I'm just looking for any opinions on what I'm seeing so that I know the architecture is the significant factor in the performance degradation and then consider any recommendations for improvements. I'm happy to provide further relevant details. This sounds like it could be something OS-specific and, googling CentOS regex performance generates hits, eg, http://pkgs.org/centos-5/puias-computational-x86_64/boost141-regex-1.4.0-2.el5.x86_64.rpm.html HTH, Charles DeRykus
Re: perl regexp performance - architecture?
On Mon, Feb 17, 2014 at 6:16 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Feb 17, 2014 at 12:41 PM, Phil Smith philbo...@gmail.com wrote: I'm currently loading some new servers with CentOS6 on which perl5.10 is the standard version of perl provided. However, I've also loaded perl5.18 and I don't think the version of perl is significant in the results I'm seeing. Basically, I'm seeing perl performance significantly slower on my new systems than on my 6 year old systems. Here's some of the relevant details: + 6 year old server, 32 bit architecture, CentOS5 perl5.8 perl, and in particular regexp operations, perform reasonably fast. + Very new server, 64 bit architecture, CentOS6, perl5.10 (and have tried perl5.18) perl, and in particular regexp operations, perform significantly slower than on the 6 year old server. That struck me as odd right off. I though surely, perl running on a modern high-end cpu is going to beat out my code running on 6 year old hardware. I've compared CPU models at various CPU benchmarking sites and the new CPUs, as you would expect, are ranked significantly higher in performance than the old. I've also installed perl5.8 on the new 64bit servers and the performance is similar to that of perl5.10 and perl5.18 on the same 64bit servers. Given that, I don't think perl version plays a significant factor is the performance diffs. Is it an accepted fact that perl performance takes a hit on 64 bit architecture? I've tried comparing some of the perl -V and Config.pm results looking for significant differences. That output is pretty verbose and the most significant difference is the architecture. I could provide some of my benchmarking code if that would be of help. The differences are significant. The only reason I'm looking at this is because I could see right off that some of my code is taking 30-40% longer to run in the new environment. Once I started putting in some timing with Time::HiRes I could see the delay involved large amounts of regexp processing. Right now, I'm just looking for any opinions on what I'm seeing so that I know the architecture is the significant factor in the performance degradation and then consider any recommendations for improvements. I'm happy to provide further relevant details. This sounds like it could be something OS-specific and, googling CentOS regex performance generates hits, eg, http://pkgs.org/centos-5/puias-computational-x86_64/boost141-regex-1.4.0-2.el5.x86_64.rpm.html No, I really don't think it is specific to a version of CentOS. I've installed various permutations of 32 and 64 bit CentOS 5 and 6. The better performance seems to follow the 32 bit architecture rather than a specific Perl version or CentOS version. Phil
Passing multiple select statements to MySQL
I'm helping someone retrieve some info from a MySQL db and I'm having trouble sending multiple select statements with Perl. Here's a portion of the code: use SQL::SplitStatement; my $query_4 = CREATE TEMPORARY TABLE `temp_ip` AS (SELECT `ip` FROM `ip_addresses` .$daily. AND TRIM(`referrer`) LIKE '' GROUP BY `ip` HAVING COUNT(*) 1); SELECT `ip`, `page`, `url`, `time_stamp` FROM `ip_addresses` .$daily. AND TRIM(`referrer`) LIKE '' AND `ip` IN (SELECT `ip` FROM `temp_ip`); my $sql_splitter = SQL::SplitStatement-new( keep_terminators = 1, keep_extra_spaces = 1, keep_comments = 0, keep_empty_statements = 1 ); my @statements = $sql_splitter-split($query_4); my $sql_string = join ' ', @statements; my $sth_4 = $dbh-prepare($sql_string); $sth_4-execute(); I believe what's throwing a wrench in it is the ; separating the 2 select statements. That's why I'm using SQL::SplitStatement, but that doesn't seem to help, so I'm sure I'm doing something wrong. The SQL works fine, so my problem must be with my Perl code. I've read everything I can get my hands on but no luck. Any help would be greatly appreciated. Thanks, Frank http://www.surfshopcart.com/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Fwd: perl regexp performance - architecture?
On Mon, Feb 17, 2014 at 4:25 PM, Phil Smith philbo...@gmail.com wrote: On Mon, Feb 17, 2014 at 6:16 PM, Charles DeRykus dery...@gmail.comwrote: On Mon, Feb 17, 2014 at 12:41 PM, Phil Smith philbo...@gmail.com wrote: I'm currently loading some new servers with CentOS6 on which perl5.10 is the standard version of perl provided. However, I've also loaded perl5.18 and I don't think the version of perl is significant in the results I'm seeing. Basically, I'm seeing perl performance significantly slower on my new systems than on my 6 year old systems. Here's some of the relevant details: + 6 year old server, 32 bit architecture, CentOS5 perl5.8 perl, and in particular regexp operations, perform reasonably fast. + Very new server, 64 bit architecture, CentOS6, perl5.10 (and have tried perl5.18) perl, and in particular regexp operations, perform significantly slower than on the 6 year old server. That struck me as odd right off. I though surely, perl running on a modern high-end cpu is going to beat out my code running on 6 year old hardware. I've compared CPU models at various CPU benchmarking sites and the new CPUs, as you would expect, are ranked significantly higher in performance than the old. I've also installed perl5.8 on the new 64bit servers and the performance is similar to that of perl5.10 and perl5.18 on the same 64bit servers. Given that, I don't think perl version plays a significant factor is the performance diffs. Is it an accepted fact that perl performance takes a hit on 64 bit architecture? I've tried comparing some of the perl -V and Config.pm results looking for significant differences. That output is pretty verbose and the most significant difference is the architecture. I could provide some of my benchmarking code if that would be of help. The differences are significant. The only reason I'm looking at this is because I could see right off that some of my code is taking 30-40% longer to run in the new environment. Once I started putting in some timing with Time::HiRes I could see the delay involved large amounts of regexp processing. Right now, I'm just looking for any opinions on what I'm seeing so that I know the architecture is the significant factor in the performance degradation and then consider any recommendations for improvements. I'm happy to provide further relevant details. This sounds like it could be something OS-specific and, googling CentOS regex performance generates hits, eg, http://pkgs.org/centos-5/puias-computational-x86_64/boost141-regex-1.4.0-2.el5.x86_64.rpm.html No, I really don't think it is specific to a version of CentOS. I've installed various permutations of 32 and 64 bit CentOS 5 and 6. The better performance seems to follow the 32 bit architecture rather than a specific Perl version or CentOS version. Newer perl regex engines have added Unicode support which can add drag. I'd be surprised though if just the 64-bit architecture itself was totally responsible for major slowdowns. Some of the issues are mentioned here: http://stackoverflow.com/questions/17800112/upgraded-from-perl-5-8-32bit-to-5-16-64bit-regex-performance-hit Per above, some of the items, you'll need to be careful with: were both Perls compiled with the same flags? are both perls threaded perls (disabling threading support makes it faster) how big are your integers? 64 bit or 32 bit? what compiler optimizations were chosen? did your previous Perl have some distribution-specific patches applied? Basically, you have to compare the whole perl -V output -- Charles DeRykus As you can see, you need to be carefully examining the comparison scenarios. -- Charles DeRykus
Re: perl regexp performance - architecture?
On Mon, Feb 17, 2014 at 9:10 PM, Charles DeRykus dery...@gmail.com wrote: On Mon, Feb 17, 2014 at 4:25 PM, Phil Smith philbo...@gmail.com wrote: On Mon, Feb 17, 2014 at 6:16 PM, Charles DeRykus dery...@gmail.comwrote: On Mon, Feb 17, 2014 at 12:41 PM, Phil Smith philbo...@gmail.comwrote: I'm currently loading some new servers with CentOS6 on which perl5.10 is the standard version of perl provided. However, I've also loaded perl5.18 and I don't think the version of perl is significant in the results I'm seeing. Basically, I'm seeing perl performance significantly slower on my new systems than on my 6 year old systems. Here's some of the relevant details: + 6 year old server, 32 bit architecture, CentOS5 perl5.8 perl, and in particular regexp operations, perform reasonably fast. + Very new server, 64 bit architecture, CentOS6, perl5.10 (and have tried perl5.18) perl, and in particular regexp operations, perform significantly slower than on the 6 year old server. That struck me as odd right off. I though surely, perl running on a modern high-end cpu is going to beat out my code running on 6 year old hardware. I've compared CPU models at various CPU benchmarking sites and the new CPUs, as you would expect, are ranked significantly higher in performance than the old. I've also installed perl5.8 on the new 64bit servers and the performance is similar to that of perl5.10 and perl5.18 on the same 64bit servers. Given that, I don't think perl version plays a significant factor is the performance diffs. Is it an accepted fact that perl performance takes a hit on 64 bit architecture? I've tried comparing some of the perl -V and Config.pm results looking for significant differences. That output is pretty verbose and the most significant difference is the architecture. I could provide some of my benchmarking code if that would be of help. The differences are significant. The only reason I'm looking at this is because I could see right off that some of my code is taking 30-40% longer to run in the new environment. Once I started putting in some timing with Time::HiRes I could see the delay involved large amounts of regexp processing. Right now, I'm just looking for any opinions on what I'm seeing so that I know the architecture is the significant factor in the performance degradation and then consider any recommendations for improvements. I'm happy to provide further relevant details. This sounds like it could be something OS-specific and, googling CentOS regex performance generates hits, eg, http://pkgs.org/centos-5/puias-computational-x86_64/boost141-regex-1.4.0-2.el5.x86_64.rpm.html No, I really don't think it is specific to a version of CentOS. I've installed various permutations of 32 and 64 bit CentOS 5 and 6. The better performance seems to follow the 32 bit architecture rather than a specific Perl version or CentOS version. Newer perl regex engines have added Unicode support which can add drag. I'd be surprised though if just the 64-bit architecture itself was totally responsible for major slowdowns. Some of the issues are mentioned here: http://stackoverflow.com/questions/17800112/upgraded-from-perl-5-8-32bit-to-5-16-64bit-regex-performance-hit Per above, some of the items, you'll need to be careful with: were both Perls compiled with the same flags? are both perls threaded perls (disabling threading support makes it faster) how big are your integers? 64 bit or 32 bit? what compiler optimizations were chosen? did your previous Perl have some distribution-specific patches applied? Basically, you have to compare the whole perl -V output -- Charles DeRykus As you can see, you need to be carefully examining the comparison scenarios. -- Charles DeRykus Yes... I saw that link as well, Charles. I mentioned in my original post that I was looking at the diffs in perl -V output. The output is pretty verbose, but the differences seem to focus on 32bit vs 64bit architecture and configs that you would expect related to that as in various byte size definitions. Like many people (and that's an assumption), I don't build perl. I take what comes with a given distribution as with CentOS5 and CentOS6 (and soon to be CentOS7). Yes, I realize they provide versions well earlier than what is the most recent. Given that mode, which again I assume to be a common practice, I would expect the performance degradation to be something many people would commonly notice when they moved from 32bit to 64bit machines. I've tried perl5.8.8 on both 32bit and 64bit where the -V output seems limited to arch differences, so based on that the only common thread in the performance tests is the architecture and the better performance seems to follow 32 bit. Thanks, Phil
rr
发自我的小米手机