Skip to content

Instantly share code, notes, and snippets.

@llimllib
Created October 14, 2011 23:12
Show Gist options
  • Save llimllib/1288639 to your computer and use it in GitHub Desktop.
Save llimllib/1288639 to your computer and use it in GitHub Desktop.
07:11 PM ~/code/aiclass/unit2 master
$ python cacheless_fifteen.py
result: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1]
5329309 function calls in 3.121 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 3.121 3.121 <string>:1(<module>)
73095 0.036 0.000 0.077 0.000 <string>:8(__new__)
1 0.436 0.436 3.061 3.061 cacheless_fifteen.py:102(graph_search)
35621 0.051 0.000 0.077 0.000 cacheless_fifteen.py:12(actions)
1 0.060 0.060 3.121 3.121 cacheless_fifteen.py:169(main)
111411 0.155 0.000 0.207 0.000 cacheless_fifteen.py:28(result)
35622 0.012 0.000 0.012 0.000 cacheless_fifteen.py:58(goaltest)
73094 0.066 0.000 0.066 0.000 cacheless_fifteen.py:61(pathcost)
1 0.000 0.000 0.000 0.000 cacheless_fifteen.py:7(__init__)
73094 1.187 0.000 1.954 0.000 cacheless_fifteen.py:85(h)
35622 0.152 0.000 0.152 0.000 {_heapq.heappop}
73094 0.066 0.000 0.066 0.000 {_heapq.heappush}
2192820 0.148 0.000 0.148 0.000 {abs}
73095 0.041 0.000 0.041 0.000 {built-in method __new__ of type object at 0x100157760}
2192820 0.387 0.000 0.387 0.000 {divmod}
35622 0.015 0.000 0.015 0.000 {method 'add' of 'set' objects}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
147032 0.071 0.000 0.071 0.000 {method 'index' of 'list' objects}
31073 0.007 0.000 0.007 0.000 {method 'remove' of 'list' objects}
73095 0.038 0.000 0.038 0.000 {range}
73094 0.194 0.000 0.194 0.000 {zip}
07:11 PM ~/code/aiclass/unit2 master
$ python fifteenblocks.py
done shuffling
result: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1]
959358 function calls in 1.808 seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 1.808 1.808 <string>:1(<module>)
73095 0.038 0.000 0.078 0.000 <string>:8(__new__)
1 0.430 0.430 1.736 1.736 fifteenblocks.py:100(graph_search)
37621 0.055 0.000 0.081 0.000 fifteenblocks.py:12(actions)
1 0.003 0.003 0.013 0.013 fifteenblocks.py:134(randomboard)
1 0.059 0.059 1.808 1.808 fifteenblocks.py:167(main)
113411 0.157 0.000 0.211 0.000 fifteenblocks.py:28(result)
35622 0.012 0.000 0.012 0.000 fifteenblocks.py:58(goaltest)
73094 0.065 0.000 0.065 0.000 fifteenblocks.py:61(pathcost)
3 0.000 0.000 0.000 0.000 fifteenblocks.py:7(__init__)
73094 0.402 0.000 0.634 0.000 fifteenblocks.py:85(h)
2000 0.002 0.000 0.002 0.000 random.py:272(choice)
35622 0.152 0.000 0.152 0.000 {_heapq.heappop}
73094 0.065 0.000 0.065 0.000 {_heapq.heappush}
73095 0.040 0.000 0.040 0.000 {built-in method __new__ of type object at 0x100157760}
2000 0.000 0.000 0.000 0.000 {len}
35622 0.015 0.000 0.015 0.000 {method 'add' of 'set' objects}
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
151032 0.073 0.000 0.073 0.000 {method 'index' of 'list' objects}
2000 0.000 0.000 0.000 0.000 {method 'random' of '_random.Random' objects}
32755 0.008 0.000 0.008 0.000 {method 'remove' of 'list' objects}
73099 0.038 0.000 0.038 0.000 {range}
73094 0.194 0.000 0.194 0.000 {zip}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment