<s> """<STR_LIT>""" <EOL> import timeit <EOL> from pysb . integrate import Solver <EOL> from pysb . examples import robertson , earm_1_0 <EOL> import numpy as np <EOL> def check_runtime ( model , tspan , iterations , use_inline , use_analytic_jacobian ) : <EOL> Solver . _use_inline = use_inline <EOL> sol = Solver ( model , tspan , use_analytic_jacobian = use_analytic_jacobian ) <EOL> start_time = timeit . default_timer ( ) <EOL> for i in range ( iterations ) : <EOL> sol . run ( ) <EOL> elapsed = timeit . default_timer ( ) - start_time <EOL> print ( "<STR_LIT>" % <EOL> ( use_inline , use_analytic_jacobian , iterations ) ) <EOL> print ( "<STR_LIT>" % elapsed ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> arg_list = [ ( <NUM_LIT:0> , <NUM_LIT:0> ) , ( <NUM_LIT:0> , <NUM_LIT:1> ) , ( <NUM_LIT:1> , <NUM_LIT:0> ) , ( <NUM_LIT:1> , <NUM_LIT:1> ) ] <EOL> print ( "<STR_LIT>" ) <EOL> earm_tspan = np . linspace ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT:1000> ) <EOL> for args in arg_list : <EOL> check_runtime ( earm_1_0 . model , earm_tspan , <NUM_LIT:1000> , * args ) <EOL> print ( "<STR_LIT>" ) <EOL> rob_tspan = np . linspace ( <NUM_LIT:0> , <NUM_LIT:100> ) <EOL> for args in arg_list : <EOL> check_runtime ( robertson . model , rob_tspan , <NUM_LIT> , * args ) </s>
