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

my Int $len = 16;
my $maxlen = 32768;
my $how-many =100000;
while $len <= $maxlen {
    my $start = now;
    my @range = (0..$len-1);	
    for 1..$how-many  {
        my @first = Bool.roll xx $len;
	my @second = Bool.roll xx $len;	
    	my @points = @range.pick(2);
	my @xover = ( @points[1] > @points[0] )??@points!!@points[1],@points[0];
	my @offspring1 = @first;
	my @offspring2 = @second;
	@offspring1[@xover[0]..@xover[1]-1] = @second[@xover[0]..@xover[1]-1];
	@offspring2[@xover[0]..@xover[1]-1] = @first[@xover[0]..@xover[1]-1];


    }
    say "perl6-BitVector,$len,",now - $start;
    $len = $len*2;
}<commit_msg>Copy over crossover from the library<commit_after>#!/usr/bin/env perl6

my Int $len = 16;
my $maxlen = 32768;
my $how-many =100000;
while $len <= $maxlen {
    my $start = now;
    my @range = (0..$len-1);	
    for 1..$how-many  {
        crossover( Bool.roll xx $len, Bool.roll xx $len );
    }
    say "perl6-BitVector,$len,",now - $start;
    $len = $len*2;
}

sub crossover ( @chromosome1 is copy, @chromosome2 is copy ) is export {
    my $length = @chromosome1.elems;
    my $xover1 = (^($length-2)).pick;
    my $xover2 = ($xover1^..^$length).pick;
    my @x-chromosome = @chromosome2;
    my @þone = $xover1..$xover2;
    @chromosome2[@þone] = @chromosome1[@þone];
    @chromosome1[@þone] = @x-chromosome[@þone];
    return [@chromosome1,@chromosome2];
}
{'fraction_non_alphanumeric': 0.20900774102744546, 'fraction_numerical': 0.05207600281491907, 'mean_word_length': 3.2071005917159763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, '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': '4450161', 'n_tokens_mistral': 673, 'n_tokens_neox': 604, 'n_words': 127}