<commit_before>#!/usr/bin/env perl

use 5.16.0;

use Benchmark qw(:all) ;
use Iston::XS::Utils;
use Iston::XS::Utils::PP;
use SDL::Image;

my $sample = SDL::Image::load('t/data/2-colors.png');
my $ptr = $sample->get_pixels_ptr;

cmpthese(100, {
    'pure perl pattern extracting' => sub {
        Iston::XS::Utils::find_uniq_pixels($ptr);
    },
    'xs pattern extracting' => sub {
        Iston::XS::Utils::PP::find_uniq_pixels($ptr);
    },
});

my @pattern = keys %{ Iston::XS::Utils::find_uniq_pixels($ptr) };
cmpthese(100, {
    'pure perl pattern matching' => sub {
        Iston::XS::Utils::find_matching_pixels($ptr, \@pattern);
    },
    'xs pattern matching' => sub {
        Iston::XS::Utils::PP::find_matching_pixels($ptr, \@pattern);
    },
});
<commit_msg>More correctly create module distribution<commit_after>#!/usr/bin/env perl

use 5.16.0;

use Benchmark qw(:all) ;
use Iston::XS::Utils;
use Iston::XS::Utils::PP;
use SDL::Image;

my $sample = SDL::Image::load('t/data/2-colors.png');
my $ptr = $sample->get_pixels_ptr;

cmpthese(10, {
    'pure perl pattern extracting' => sub {
        Iston::XS::Utils::find_uniq_pixels($ptr);
    },
    'xs pattern extracting' => sub {
        Iston::XS::Utils::PP::find_uniq_pixels($ptr);
    },
});

my @pattern = keys %{ Iston::XS::Utils::find_uniq_pixels($ptr) };
cmpthese(10, {
    'pure perl pattern matching' => sub {
        Iston::XS::Utils::find_matching_pixels($ptr, \@pattern);
    },
    'xs pattern matching' => sub {
        Iston::XS::Utils::PP::find_matching_pixels($ptr, \@pattern);
    },
});

{'fraction_non_alphanumeric': 0.19872611464968154, 'fraction_numerical': 0.012738853503184714, 'mean_word_length': 4.084142394822006, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1277472', 'n_tokens_mistral': 635, 'n_tokens_neox': 588, 'n_words': 102}