Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In [1]: from ps10 import *
- In [2]: LARGE_DIST = 1000000
- In [3]: mitMap = load_map("mit_map.txt")
- In [4]: %prun dfsPath1 = directedDFS(mitMap, '1', '3', 100, 100)
- 1261 function calls (1246 primitive calls) in 0.002 seconds
- Ordered by: internal time
- ncalls tottime percall cumtime percall filename:lineno(function)
- 1 0.000 0.000 0.002 0.002 ps10.py:141(directedDFS)
- 43 0.000 0.000 0.001 0.000 ps10.py:145(lenPath)
- 663 0.000 0.000 0.000 0.000 graph.py:20(__hash__)
- 16/1 0.000 0.000 0.001 0.001 ps10.py:143(bFS)
- 143 0.000 0.000 0.000 0.000 graph.py:8(__init__)
- 149 0.000 0.000 0.000 0.000 graph.py:16(__eq__)
- 13 0.000 0.000 0.000 0.000 ps10.py:68(childrenOf)
- 43 0.000 0.000 0.000 0.000 {range}
- 68 0.000 0.000 0.000 0.000 graph.py:12(__str__)
- 76 0.000 0.000 0.000 0.000 {isinstance}
- 1 0.000 0.000 0.002 0.002 <string>:1(<module>)
- 43 0.000 0.000 0.000 0.000 {len}
- 1 0.000 0.000 0.000 0.000 {method 'iteritems' of 'dict' objects}
- 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
- In [5]: %prun brutePath1 = bruteForceSearch(mitMap, '1', '3', 100, 100)
- 100326962 function calls (99593268 primitive calls) in 47.141 seconds
- Ordered by: internal time
- ncalls tottime percall cumtime percall filename:lineno(function)
- 811652 25.452 0.000 42.840 0.000 ps10.py:86(lenPath)
- 31254480 8.044 0.000 8.044 0.000 graph.py:8(__init__)
- 31254738 4.955 0.000 4.955 0.000 graph.py:20(__hash__)
- 31254482 4.514 0.000 4.514 0.000 graph.py:16(__eq__)
- 733695/1 2.996 0.000 47.140 47.140 ps10.py:84(bFS)
- 655738 0.606 0.000 0.844 0.000 ps10.py:68(childrenOf)
- 2738793 0.274 0.000 0.274 0.000 graph.py:12(__str__)
- 811652 0.242 0.000 0.242 0.000 {range}
- 811652 0.057 0.000 0.057 0.000 {len}
- 1 0.000 0.000 47.141 47.141 ps10.py:82(bruteForceSearch)
- 76 0.000 0.000 0.000 0.000 {isinstance}
- 1 0.000 0.000 47.141 47.141 <string>:1(<module>)
- 1 0.000 0.000 0.000 0.000 {method 'iteritems' of 'dict' objects}
- 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