<s> import time <EOL> from nose . tools import * <EOL> def test_benchmark ( ) : <EOL> TRIALS = range ( <NUM_LIT> ) <EOL> integer = <NUM_LIT:1> <EOL> float = <NUM_LIT> <EOL> long = <NUM_LIT> <EOL> stime = time . clock ( ) <EOL> for i in TRIALS : <EOL> answer = isinstance ( integer , ( int , float , long , complex ) ) <EOL> ok_ ( answer ) <EOL> print ( "<STR_LIT>" % ( time . clock ( ) - stime ) ) <EOL> stime = time . clock ( ) <EOL> for i in TRIALS : <EOL> answer = ( integer . __class__ in set ( ( int , float , long , complex ) ) ) <EOL> ok_ ( answer ) <EOL> print ( "<STR_LIT>" % ( time . clock ( ) - stime ) ) <EOL> stime = time . clock ( ) <EOL> for i in TRIALS : <EOL> answer = ( integer . __class__ == int or integer . __class__ == float or integer . __class__ == long or integer . __class__ == complex ) <EOL> ok_ ( answer ) <EOL> print ( "<STR_LIT>" % ( time . clock ( ) - stime ) ) </s>
