Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Detecting whether UV fits into an NV

by roboticus (Chancellor)
on Mar 04, 2020 at 23:33 UTC ( [id://11113796]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ diff pm_11113750_orig.pl pm_11113750_a.pl
    26a27
    ...
    <     if(!(SvUV(ST(i)) & invalid_bits)) count++;
    ---
    >     if(!(arg & invalid_bits)) count++;
    
  2. or download this
    $ PERL5OPT= perl pm_11113750_orig.pl
    Benchmark: timing 5 iterations of uv_fits_double3, uv_fits_double_bitf
    +iddle...
    ...
    uv_fits_double3:  7 wallclock secs ( 6.75 usr +  0.00 sys =  6.75 CPU)
    + @  0.74/s (n=5)
    uv_fits_double_bitfiddle:  6 wallclock secs ( 6.67 usr +  0.00 sys =  
    +6.67 CPU) @  0.75/s (n=5)
    46875 46875
    
  3. or download this
    int uv_fits_double3x(SV* the_min, SV* the_max) {
      dXSARGS;
    ...
      }
      return count;
    }
    
  4. or download this
    $ PERL5OPT= perl pm_11113750_x.pl
    Name "main::count4" used only once: possible typo at pm_11113750_x.pl 
    +line 147.
    ...
    empty_loop:  0 wallclock secs ( 0.00 usr +  0.00 sys =  0.00 CPU)
                (warning: too few iterations for a reliable count)
    33046875 33046875 48000000 1416858175
    
  5. or download this
    use warnings;
    use Benchmark;
    ...
    });
    print "$count1 $count2 $count3 $count4\n";
    print "!!!! MISMATCH !!!!\n" if $count1 != $count2;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11113796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 16:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found