Current File : //usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyc |
�
E�`Qc @ s* d d l m Z d e f d � � YZ d S( i����( t Timert Benchmarkc B s2 e Z d Z d d d d � Z d � Z d � Z RS( s) Benchmark a feature in different modules.t i i� c C s8 t d � | D� � | _ | | _ | | _ | | _ d S( Nc s s | ] } | d f Vq d S( R N( ( t .0t m( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pys <genexpr> s ( t dictt module_testt runst repst title( t selft modulesR R R ( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt __init__ s c C sr | \ } } | d k r* | j j � } n | g } x8 | D]0 } d | | f | } t | | � | j | <q: Wd S( s Set the test code for modules.t alls import %s; import %s as np; N( R t keysR ( R
t modulet .2t test_strt setup_strR R ( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt __setitem__ s
c C s� t d � | j D� � } | j r- | j GHn d | j | j f GHd d GHxw t | j � D]f } | j | � } y, d | | j | j | j | j � f GHWq[ t k
r� } d | | f GHq[ Xq[ Wd d GHHd S( s+ Run the benchmark on the different modules.c s s | ] } t | � Vq d S( N( t len( R t mod( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pys <genexpr> s s! Doing %d runs, each with %d reps.t -iO s %s: %ss %s: Failed to benchmark (%s).N( t maxR R R R t sortedt ljustt repeatt Exception( R
t module_column_lenR t modnamet e( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt run s & ( t __name__t
__module__t __doc__R R R ( ( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyR s N( t timeitR R R ( ( ( sD /usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt <module> s