@ -29,14 +29,46 @@ int main(int argc, char** argv) {
fclose ( file ) ;
fclose ( file ) ;
}
}
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
ink_compile ( ctx , read_buffer ) ;
int increment = 1 < < 16 ;
int counter = increment ;
int c ;
begin = clock ( ) ;
begin = clock ( ) ;
clock_gettime ( CLOCK_MONOTONIC , & start_time ) ;
clock_gettime ( CLOCK_MONOTONIC , & start_time ) ;
while ( ink_can_run ( ctx ) ) {
while ( ink_can_run ( ctx ) ) {
ink_step_everyone ( ctx ) ;
for ( c = 0 ; c < 64 ; + + c )
ink_step_everyone ( ctx ) ;
if ( ctx - > steps < counter ) {
ink_gc ( ctx ) ;
counter + = increment ;
}
}
}
clock_gettime ( CLOCK_MONOTONIC , & end_time ) ;
clock_gettime ( CLOCK_MONOTONIC , & end_time ) ;
ink_gc ( ctx ) ;
end = clock ( ) ;
end = clock ( ) ;
time_spent = ctx - > steps / ( double ) ( ( end - begin ) / CLOCKS_PER_SEC ) ;
time_spent = ctx - > steps / ( double ) ( ( end - begin ) / CLOCKS_PER_SEC ) ;
s_total + = ( end_time . tv_sec - start_time . tv_sec ) + ( end_time . tv_nsec - start_time . tv_nsec ) / 1.0e9 ;
s_total + = ( end_time . tv_sec - start_time . tv_sec ) + ( end_time . tv_nsec - start_time . tv_nsec ) / 1.0e9 ;