Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

chipmunk

by chipmunk (Parson)
on Nov 28, 2000 at 00:33 UTC ( #43546=user: print w/replies, xml ) Need Help??

#!perl -w use strict; use Benchmark; Benchmark->import(qw/cmpthese/) if $^V; my $time = shift || 2; my $str = 'StRiNg'; my $var = 'sTrInG'; my %bms = ( reoi => sub { $str =~ /^\Q$var\E\z/oi }, rei => sub { $str =~ /^\Q$var\E\z/i }, lc => sub { lc($str) eq lc($var) }, ); if ($^V) { cmpthese(-$time, \%bms); } else { timethese(-$time, \%bms); } __END__ Benchmark: running lc, rei, reoi, each for at least 2 CPU seconds... lc: 5 wallclock secs ( 2.11 usr + -0.02 sys = 2.09 CPU) @ 56 +4093.78/s (n=1178956) rei: 5 wallclock secs ( 2.01 usr + 0.00 sys = 2.01 CPU) @ 19 +5359.20/s (n=392672) reoi: 5 wallclock secs ( 2.26 usr + 0.02 sys = 2.28 CPU) @ 61 +1101.32/s (n=1393311) Rate rei lc reoi rei 195359/s -- -65% -68% lc 564094/s 189% -- -8% reoi 611101/s 213% 8% --

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[stevieb]: I don't know what you mean. I write the code in C/C++ that accesses the ICs per the datasheet, wrap it for Perl, then use them. My code ensures that the functions/methods from Perl do the right thing for the chips/sensors etc
[stevieb]: At least that's what I'm working on right now. I've also been updating my automated test software Test::BrewBuild so it handles this work properly. It's not really easy meshing high level languages with low-level hardware :)
[stevieb]: this link is probably better for an overview of my test software

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2017-06-25 23:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.