#NEWLINE# def test_merge_opt_runtime( ) : #NEWLINE# #INDENT# 'In the original merge optimization, the following graph took\n    like caused the MERGE optimizer to exhibit really bad performance\n    (quadratic? exponential?)\n\n    Ironically, there is actually no merging to do in this graph.\n\n    ' #NEWLINE# x = T . dvector ( ) #NEWLINE# for i in xrange ( 50 ) : #NEWLINE# #INDENT# if i : #NEWLINE# #INDENT# r = ( r + ( r / 10 ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# r = x #NEWLINE# #UNINDENT# #UNINDENT# t = time . time ( ) #NEWLINE# f = theano . function ( [ x ] , r , mode = 'FAST_COMPILE' ) #NEWLINE# dt = ( time . time ( ) - t ) #NEWLINE# assert ( dt < 5.0 ) , dt