Advertisement
user_137

Untitled

May 24th, 2013
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.49 KB | None | 0 0
  1.  
  2. In [1]: from ps10 import *
  3.  
  4. In [2]: LARGE_DIST = 1000000
  5.  
  6. In [3]: mitMap = load_map("mit_map.txt")
  7.  
  8. In [4]: %prun dfsPath1 = directedDFS(mitMap, '1', '3', 100, 100)
  9.          1261 function calls (1246 primitive calls) in 0.002 seconds
  10.  
  11.    Ordered by: internal time
  12.  
  13.    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  14.         1    0.000    0.000    0.002    0.002 ps10.py:141(directedDFS)
  15.        43    0.000    0.000    0.001    0.000 ps10.py:145(lenPath)
  16.       663    0.000    0.000    0.000    0.000 graph.py:20(__hash__)
  17.      16/1    0.000    0.000    0.001    0.001 ps10.py:143(bFS)
  18.       143    0.000    0.000    0.000    0.000 graph.py:8(__init__)
  19.       149    0.000    0.000    0.000    0.000 graph.py:16(__eq__)
  20.        13    0.000    0.000    0.000    0.000 ps10.py:68(childrenOf)
  21.        43    0.000    0.000    0.000    0.000 {range}
  22.        68    0.000    0.000    0.000    0.000 graph.py:12(__str__)
  23.        76    0.000    0.000    0.000    0.000 {isinstance}
  24.         1    0.000    0.000    0.002    0.002 <string>:1(<module>)
  25.        43    0.000    0.000    0.000    0.000 {len}
  26.         1    0.000    0.000    0.000    0.000 {method 'iteritems' of 'dict' objects}
  27.         1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
  28.  
  29.  
  30. In [5]: %prun brutePath1 = bruteForceSearch(mitMap, '1', '3', 100, 100)
  31.          100326962 function calls (99593268 primitive calls) in 47.141 seconds
  32.  
  33.    Ordered by: internal time
  34.  
  35.    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  36.    811652   25.452    0.000   42.840    0.000 ps10.py:86(lenPath)
  37.  31254480    8.044    0.000    8.044    0.000 graph.py:8(__init__)
  38.  31254738    4.955    0.000    4.955    0.000 graph.py:20(__hash__)
  39.  31254482    4.514    0.000    4.514    0.000 graph.py:16(__eq__)
  40.  733695/1    2.996    0.000   47.140   47.140 ps10.py:84(bFS)
  41.    655738    0.606    0.000    0.844    0.000 ps10.py:68(childrenOf)
  42.   2738793    0.274    0.000    0.274    0.000 graph.py:12(__str__)
  43.    811652    0.242    0.000    0.242    0.000 {range}
  44.    811652    0.057    0.000    0.057    0.000 {len}
  45.         1    0.000    0.000   47.141   47.141 ps10.py:82(bruteForceSearch)
  46.        76    0.000    0.000    0.000    0.000 {isinstance}
  47.         1    0.000    0.000   47.141   47.141 <string>:1(<module>)
  48.         1    0.000    0.000    0.000    0.000 {method 'iteritems' of 'dict' objects}
  49.         1    0.000    0.000    0.000    0.000 {method 'disable' of '_lsprof.Profiler' objects}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement