<commit_before>
function good( num ){
    var x = 6;
    for ( var i=0; i<num ; i += 2 ){
        x += 2;
    }
    return x;
}

function bad( num ){
    var x = 6;
    var i = "abc"
    for ( var i=0; i<num; i += 2 ){
        x += 2;
    }
    return x;
}

var num = 40000;
var numCalls = 10;

assert( good( num ) == bad( num ) );

print( "inf2" );
for ( var i=0; i<5; i++ ){

    var a = Date.timeFunc( good , numCalls , num );
    var b = Date.timeFunc( bad , numCalls , num );

    b += Date.timeFunc( bad , numCalls , num );
    a += Date.timeFunc( good , numCalls , num );

    if ( i == 0 )
        continue; // for jit

    print( "\t good: " + a  + " bad: " + b );
    assert( a < b , "too slow");
}
<commit_msg>the hudson machine is annoying<commit_after>
function good( num ){
    var x = 6;
    for ( var i=0; i<num ; i += 2 ){
        x += 2;
    }
    return x;
}

function bad( num ){
    var x = 6;
    var i = "abc"
    for ( var i=0; i<num; i += 2 ){
        x += 2;
    }
    return x;
}

var num = 40000;
var numCalls = 10;

assert( good( num ) == bad( num ) );

print( "inf2" );
for ( var i=0; i<5; i++ ){

    var a = Date.timeFunc( good , numCalls , num );
    var b = Date.timeFunc( bad , numCalls , num );

    b += Date.timeFunc( bad , numCalls , num );
    a += Date.timeFunc( good , numCalls , num );

    if ( i == 0 )
        continue; // for jit

    print( "\t good: " + a  + " bad: " + b );
    //assert( a < b , "too slow");
}

{'fraction_non_alphanumeric': 0.1806981519507187, 'fraction_numerical': 0.026009582477754964, 'mean_word_length': 1.8388349514563107, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '2986061', 'n_tokens_mistral': 610, 'n_tokens_neox': 574, 'n_words': 190}