Yeah, you're right, according to module::build documentation
http://search.cpan.org/perldoc?Module%3A%3ABuild XS files auto-compiled if found in lib/ directory
I copied CRC.xs to lib/ and now it at least compiles the code (but I didn't test further installation)
On Fri Jun 14 21:52:55 2013, BRIANSKI wrote:
Show quoted text> Building with Module::Build (ie ./Build.PL && ./Build && ./Build test
> && sudo ./Build install ) fails to slurp in the XS goop and gives me a
> perl-only build.
>
> Building with ExtUtils::MakeMaker, however, installs an XS-using,
> performant version of Digest::CRC (ie. Makefile.PL && make && make
> test && sudo make install)
>
> On Fri Jun 14 13:47:58 2013, BRIANSKI wrote:
> > with Digest::CRC installed out of cpan, I get:
> >
> > ski@nigeria-v270:/tmp$ perl b_shavscrc1.t
> > (warning: too few iterations for a reliable count)
> > Rate crc sha
> > crc 329/s -- -99%
> > sha 25000/s 7500% --
> >
> >
> > But after a manual perl Makefile.PL && make && sudo make install, I
> get:
> > ski@nigeria-v270:/tmp$ perl b_shavscrc1.t
> > (warning: too few iterations for a reliable count)
> > (warning: too few iterations for a reliable count)
> > Rate sha crc
> > sha 25000/s -- -50%
> > crc 50000/s 100% --
> >
> >
> > On Fri Jun 14 13:44:26 2013, BRIANSKI wrote:
> > > My guess is that you are using the pure perl implementation. For
> some
> > > reason, the pure perl installation is selected when installing
> from
> > > CPAN. A manual "perl Makefile.PL && make && make test && sudo
> make
> > > install" is all it takes for me to get the XS version. Not sure
> > > what is broken.
> > >
> > >
> > >
> > > On Sun Dec 30 03:47:52 2012, vsespb wrote:
> > > > $ ./b_shavscrc1.t
> > > > (warning: too few iterations for a reliable count)
> > > > Rate crc sha
> > > > crc 334/s -- -98%
> > > > sha 20000/s 5880% --
> > > >
> > > >
> > > > $ cat b_shavscrc1.t
> > > > #!/usr/bin/perl
> > > >
> > > >
> > > > use strict;
> > > > use warnings;
> > > > use Digest::SHA qw/sha256/;
> > > > use Digest::CRC qw(crc16);
> > > > use Benchmark qw/:all/;
> > > >
> > > >
> > > > {
> > > > my $s = "Hello, world! ".('x' x 10000);
> > > >
> > > > cmpthese(1000, {
> > > > 'sha' => sub {
> > > > sha256($s);
> > > > },
> > > > 'crc' => sub {
> > > > crc16($s);
> > > > }
> > > > });
> > > > }
> > > >
> > > > $ perl -MDigest::CRC -e 'print $Digest::CRC::VERSION'
> > > > 0.18
> > >
> > >
> >
> >
>
>