XP is just a number PerlMonks

### Re^3: Detecting whether UV fits into an NV

by roboticus (Chancellor)
 on Mar 04, 2020 at 23:33 UTC Need Help??

```\$ diff pm_11113750_orig.pl pm_11113750_a.pl
26a27
...
<     if(!(SvUV(ST(i)) & invalid_bits)) count++;
---
>     if(!(arg & invalid_bits)) count++;
```
```\$ 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
```
```int uv_fits_double3x(SV* the_min, SV* the_max) {
dXSARGS;
...
}
return count;
}
```
```\$ 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
```
```use warnings;
use Benchmark;
...
});
print "\$count1 \$count2 \$count3 \$count4\n";
print "!!!! MISMATCH !!!!\n" if \$count1 != \$count2;
```

Create A New User
Node Status?
node history
Node Type: note [id://11113796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2021-04-11 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?

No recent polls found

Notices?