def test_merge_opt_runtime():
 x = T.dvector()
 for i in xrange(50):
  if i:
   r = (r + (r / 10))
  else:
   r = x
 t = time.time()
 f = theano.function([x], r, mode='FAST_COMPILE')
 dt = (time.time() - t)
 assert (dt < 5.0), dt

def test_merge_opt_runtime ( ) : x = T . dvector ( ) for i in xrange ( 50 ) : if i : r = ( r + ( r / 10 ) ) else : r = x t = time . time ( ) f = theano . function ( [ x ] , r , mode = 'FAST_COMPILE' ) dt = ( time . time ( ) - t ) assert ( dt < 5.0 ) , dt
in the original merge optimization .