Skip to content

Instantly share code, notes, and snippets.

@laserbat
Created July 3, 2011 15:11
Show Gist options
  • Save laserbat/1062305 to your computer and use it in GitHub Desktop.
Save laserbat/1062305 to your computer and use it in GitHub Desktop.
454 turns.
19482106 function calls (19060266 primitive calls) in 108.624 CPU seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 108.624 108.624 {execfile}
1 0.001 0.001 108.624 108.624 main.py:20(<module>)
1 10.960 10.960 108.602 108.602 Game.py:65(main_loop)
1489 0.072 0.000 35.286 0.024 Game.py:678(playerTurn)
1498 0.005 0.000 30.900 0.021 unicurses.py:2246(getch)
1498 0.005 0.000 30.895 0.021 unicurses.py:1147(wgetch)
1498 30.889 0.021 30.889 0.021 {built-in method getch}
1489 0.022 0.000 30.611 0.021 IO.py:98(rkey)
3293101 9.323 0.000 28.301 0.000 random.py:224(randint)
502 4.457 0.009 19.684 0.039 Game.py:313(drawmap)
3293101 15.215 0.000 18.978 0.000 random.py:160(randrange)
116647 1.757 0.000 9.418 0.000 Game.py:505(inLos)
116647 4.563 0.000 7.661 0.000 Game.py:463(get_line)
507 0.014 0.000 7.240 0.014 fov.py:36(fieldOfView)
2028 0.296 0.000 7.223 0.004 fov.py:162(__checkQuadrant)
391158/3074 2.457 0.000 7.144 0.002 copy.py:144(deepcopy)
69051 0.906 0.000 6.800 0.000 fov.py:206(__visitCoord)
29502/25338 0.401 0.000 6.546 0.000 copy.py:277(_deepcopy_inst)
665935 5.865 0.000 5.865 0.000 Game.py:1051(hasSpaceAround)
35628/25338 0.687 0.000 5.379 0.000 copy.py:251(_deepcopy_dict)
117562 1.147 0.000 4.666 0.000 IO.py:65(printex)
19313/11 0.276 0.000 4.162 0.378 copy.py:224(_deepcopy_list)
3294525 3.764 0.000 3.764 0.000 {method 'random' of '_random.Random' objects}
2355121 2.690 0.000 2.690 0.000 {method 'append' of 'list' objects}
210784 1.117 0.000 1.772 0.000 fov.py:144(relativeSlope)
222481 0.588 0.000 1.509 0.000 unicurses.py:2243(attron)
6126 0.123 0.000 1.475 0.000 copy.py:300(_reconstruct)
173144 0.462 0.000 1.162 0.000 unicurses.py:2242(attroff)
117562 0.336 0.000 1.021 0.000 unicurses.py:2275(mvaddstr)
149702 0.646 0.000 1.000 0.000 copy.py:261(_keep_alive)
224723 0.628 0.000 0.928 0.000 unicurses.py:904(color_pair)
222481 0.618 0.000 0.921 0.000 unicurses.py:792(wattron)
81327 0.225 0.000 0.915 0.000 fov.py:128(pBelowOrCollinear)
643855 0.758 0.000 0.758 0.000 {id}
66023 0.179 0.000 0.729 0.000 fov.py:134(pAboveOrCollinear)
173144 0.471 0.000 0.700 0.000 unicurses.py:783(wattroff)
546986 0.696 0.000 0.696 0.000 {method 'get' of 'dict' objects}
117562 0.430 0.000 0.685 0.000 unicurses.py:1550(mvwaddstr)
506 0.449 0.001 0.449 0.001 Game.py:386(resetFov)
349941 0.407 0.000 0.407 0.000 {abs}
9 0.000 0.000 0.360 0.040 IO.py:83(readkey)
9352 0.134 0.000 0.334 0.000 copy.py:232(_deepcopy_tuple)
210784 0.332 0.000 0.332 0.000 fov.py:123(<lambda>)
14892 0.057 0.000 0.330 0.000 fov.py:324(__checkView)
210784 0.323 0.000 0.323 0.000 fov.py:122(<lambda>)
124137 0.319 0.000 0.319 0.000 {hasattr}
269800 0.316 0.000 0.316 0.000 {len}
222481 0.303 0.000 0.303 0.000 {built-in method attron}
224723 0.299 0.000 0.299 0.000 {_curses.color_pair}
26448 0.072 0.000 0.291 0.000 fov.py:131(pAbove)
1 0.000 0.000 0.256 0.256 Game.py:451(save)
1 0.157 0.157 0.256 0.256 {cPickle.dump}
117562 0.255 0.000 0.255 0.000 {built-in method addstr}
14892 0.051 0.000 0.243 0.000 fov.py:140(lineCollinear)
126689 0.236 0.000 0.236 0.000 {range}
173144 0.229 0.000 0.229 0.000 {built-in method attroff}
19949 0.055 0.000 0.222 0.000 fov.py:137(pCollinear)
17037 0.047 0.000 0.193 0.000 fov.py:125(pBelow)
8 0.015 0.002 0.171 0.021 Game.py:533(floodFill)
8 0.090 0.011 0.156 0.020 Game.py:547(flood)
109140 0.156 0.000 0.156 0.000 cell.py:39(char)
2572 0.008 0.000 0.140 0.000 unicurses.py:2250(refresh)
2572 0.009 0.000 0.131 0.000 unicurses.py:1929(wrefresh)
2572 0.122 0.000 0.122 0.000 {built-in method refresh}
4734 0.037 0.000 0.100 0.000 fov.py:308(__addSteepBump)
10158 0.055 0.000 0.099 0.000 fov.py:292(__addShallowBump)
2097 0.027 0.000 0.098 0.000 gzip.py:187(write)
101 0.002 0.000 0.096 0.001 Game.py:620(mobTurn)
20 0.000 0.000 0.091 0.005 Game.py:520(aStarPathfind)
20 0.001 0.000 0.091 0.005 AStar.py:143(getPath)
20 0.034 0.002 0.090 0.005 AStar.py:55(pathFind)
35628 0.071 0.000 0.071 0.000 {method 'update' of 'dict' objects}
4 0.017 0.004 0.069 0.017 Level.py:51(generateLevel)
33946 0.068 0.000 0.068 0.000 Game.py:376(isBlocking)
6126 0.065 0.000 0.065 0.000 {method '__reduce_ex__' of 'object' objects}
49781 0.063 0.000 0.063 0.000 copy.py:197(_deepcopy_atomic)
35628 0.061 0.000 0.061 0.000 {method 'iteritems' of 'dict' objects}
49453 0.057 0.000 0.057 0.000 {method 'reverse' of 'list' objects}
2097 0.053 0.000 0.053 0.000 {built-in method compress}
27519 0.053 0.000 0.053 0.000 Game.py:381(setVisible)
20 0.024 0.001 0.039 0.002 Level.py:25(createRoom)
27519 0.039 0.000 0.039 0.000 {method 'add' of 'set' objects}
24586 0.033 0.000 0.033 0.000 {min}
24586 0.032 0.000 0.032 0.000 {max}
18378 0.029 0.000 0.029 0.000 {isinstance}
6126 0.018 0.000 0.027 0.000 copy_reg.py:92(__newobj__)
14892 0.026 0.000 0.026 0.000 fov.py:149(__init__)
12252 0.024 0.000 0.024 0.000 {getattr}
1 0.004 0.004 0.021 0.021 Game.py:589(spawnMobs)
1462 0.013 0.000 0.020 0.000 {_heapq.heappop}
1 0.007 0.007 0.019 0.019 Game.py:18(<module>)
1424 0.014 0.000 0.017 0.000 random.py:259(choice)
9408 0.015 0.000 0.015 0.000 Level.py:140(near)
1489 0.005 0.000 0.014 0.000 unicurses.py:1755(nocbreak)
7545 0.013 0.000 0.013 0.000 cell.py:36(__init__)
1498 0.004 0.000 0.012 0.000 unicurses.py:2255(timeout)
1444 0.005 0.000 0.012 0.000 AStar.py:33(updatePriority)
7468 0.011 0.000 0.011 0.000 AStar.py:31(__lt__)
4056 0.011 0.000 0.011 0.000 fov.py:116(__init__)
1701 0.007 0.000 0.011 0.000 {_heapq.heappush}
1499 0.005 0.000 0.010 0.000 unicurses.py:873(cbreak)
6126 0.010 0.000 0.010 0.000 {issubclass}
1489 0.005 0.000 0.010 0.000 unicurses.py:1243(halfdelay)
13 0.010 0.001 0.010 0.001 Game.py:395(resetFlood)
1489 0.009 0.000 0.009 0.000 {_curses.nocbreak}
6126 0.009 0.000 0.009 0.000 {built-in method __new__ of type object at 0xb7806d20}
1 0.001 0.001 0.008 0.008 IO.py:19(<module>)
1498 0.005 0.000 0.008 0.000 unicurses.py:2126(wtimeout)
1 0.001 0.001 0.007 0.007 unicurses.py:19(<module>)
1444 0.005 0.000 0.007 0.000 AStar.py:42(estimate)
2107 0.006 0.000 0.006 0.000 {method 'write' of 'file' objects}
1499 0.006 0.000 0.006 0.000 {_curses.cbreak}
3063 0.005 0.000 0.005 0.000 {method 'insert' of 'list' objects}
1489 0.005 0.000 0.005 0.000 {_curses.halfdelay}
2098 0.005 0.000 0.005 0.000 {zlib.crc32}
20 0.001 0.000 0.005 0.000 Level.py:44(hCorridor)
2598 0.004 0.000 0.004 0.000 you.py:26(char)
2028 0.004 0.000 0.004 0.000 fov.py:155(__init__)
1 0.003 0.003 0.004 0.004 __init__.py:4(<module>)
1930 0.004 0.000 0.004 0.000 AStar.py:26(__init__)
1398 0.003 0.000 0.003 0.000 {chr}
1424 0.003 0.000 0.003 0.000 AStar.py:36(nextMove)
3 0.002 0.001 0.002 0.001 Game.py:402(amnesia)
1498 0.002 0.000 0.002 0.000 {built-in method timeout}
1445 0.002 0.000 0.002 0.000 {math.sqrt}
480 0.002 0.000 0.002 0.000 Game.py:498(moveMob)
1 0.000 0.000 0.002 0.002 Game.py:36(__init__)
1 0.000 0.000 0.002 0.002 IO.py:27(__init__)
20 0.000 0.000 0.001 0.000 Level.py:37(vCorridor)
1 0.001 0.001 0.001 0.001 random.py:40(<module>)
770 0.001 0.000 0.001 0.000 cell.py:53(char)
1 0.001 0.001 0.001 0.001 __init__.py:11(<module>)
1 0.000 0.000 0.001 0.001 unicurses.py:1351(initscr)
1 0.000 0.000 0.001 0.001 __init__.py:28(initscr)
1 0.000 0.000 0.001 0.001 AStar.py:18(<module>)
1 0.001 0.001 0.001 0.001 heapq.py:31(<module>)
222 0.001 0.000 0.001 0.000 cell.py:84(__init__)
1 0.000 0.000 0.001 0.001 gzip.py:323(__del__)
1 0.000 0.000 0.001 0.001 gzip.py:308(close)
1 0.001 0.001 0.001 0.001 gzip.py:4(<module>)
287 0.000 0.000 0.000 0.000 Level.py:184(intersect)
1 0.000 0.000 0.000 0.000 gzip.py:26(open)
1 0.000 0.000 0.000 0.000 gzip.py:44(__init__)
1 0.000 0.000 0.000 0.000 {_curses.initscr}
1 0.000 0.000 0.000 0.000 panel.py:4(<module>)
1 0.000 0.000 0.000 0.000 {built-in method flush}
177 0.000 0.000 0.000 0.000 cell.py:123(char)
1 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects}
185 0.000 0.000 0.000 0.000 {method 'pop' of 'list' objects}
4 0.000 0.000 0.000 0.000 locale.py:499(setlocale)
1 0.000 0.000 0.000 0.000 __init__.py:337(__init__)
120 0.000 0.000 0.000 0.000 Level.py:173(__init__)
4 0.000 0.000 0.000 0.000 {_locale.setlocale}
1 0.000 0.000 0.000 0.000 cell.py:18(<module>)
1 0.000 0.000 0.000 0.000 {open}
101 0.000 0.000 0.000 0.000 Game.py:1065(near)
1 0.000 0.000 0.000 0.000 genericpath.py:26(isfile)
1 0.000 0.000 0.000 0.000 _endian.py:4(<module>)
5 0.000 0.000 0.000 0.000 unicurses.py:2245(clear)
14 0.000 0.000 0.000 0.000 __init__.py:147(_check_size)
3 0.000 0.000 0.000 0.000 __init__.py:78(CFUNCTYPE)
1 0.000 0.000 0.000 0.000 {posix.stat}
5 0.000 0.000 0.000 0.000 unicurses.py:927(wclear)
1 0.000 0.000 0.000 0.000 random.py:90(__init__)
1 0.000 0.000 0.000 0.000 random.py:99(seed)
1 0.000 0.000 0.000 0.000 bisect.py:1(<module>)
5 0.000 0.000 0.000 0.000 {built-in method clear}
32 0.000 0.000 0.000 0.000 unicurses.py:352(ALTCHAR)
1 0.000 0.000 0.000 0.000 gzip.py:133(_write_gzip_header)
32 0.000 0.000 0.000 0.000 unicurses.py:343(CCHAR)
3 0.000 0.000 0.000 0.000 __init__.py:480(PYFUNCTYPE)
1 0.000 0.000 0.000 0.000 {_curses.setupterm}
1 0.000 0.000 0.000 0.000 Level.py:18(<module>)
44 0.000 0.000 0.000 0.000 Level.py:179(center)
1 0.000 0.000 0.000 0.000 fov.py:32(<module>)
2 0.000 0.000 0.000 0.000 {_ctypes.POINTER}
1 0.000 0.000 0.000 0.000 unicurses.py:2025(start_color)
1 0.000 0.000 0.000 0.000 {function seed at 0x8194f44}
64 0.000 0.000 0.000 0.000 {ord}
45 0.000 0.000 0.000 0.000 {setattr}
1 0.000 0.000 0.000 0.000 unicurses.py:2222(use_default_colors)
1 0.000 0.000 0.000 0.000 Game.py:306(end)
1 0.000 0.000 0.000 0.000 __init__.py:45(start_color)
1 0.000 0.000 0.000 0.000 {_curses.use_default_colors}
1 0.000 0.000 0.000 0.000 {zlib.compressobj}
1 0.000 0.000 0.000 0.000 os.py:747(urandom)
31 0.000 0.000 0.000 0.000 cell.py:80(char)
1 0.000 0.000 0.000 0.000 unicurses.py:1466(keypad)
1 0.000 0.000 0.000 0.000 __future__.py:48(<module>)
34 0.000 0.000 0.000 0.000 {_ctypes.sizeof}
3 0.000 0.000 0.000 0.000 gzip.py:18(write32u)
1 0.000 0.000 0.000 0.000 {built-in method keypad}
1 0.000 0.000 0.000 0.000 unicurses.py:1082(endwin)
3 0.000 0.000 0.000 0.000 unicurses.py:963(curs_set)
18 0.000 0.000 0.000 0.000 {_struct.calcsize}
1 0.000 0.000 0.000 0.000 {_curses.endwin}
1 0.000 0.000 0.000 0.000 {method 'close' of 'file' objects}
1 0.000 0.000 0.000 0.000 locale.py:544(getpreferredencoding)
8 0.000 0.000 0.000 0.000 unicurses.py:1342(init_pair)
1 0.000 0.000 0.000 0.000 copy_reg.py:95(_slotnames)
13 0.000 0.000 0.000 0.000 cell.py:111(__init__)
1 0.000 0.000 0.000 0.000 random.py:71(Random)
3 0.000 0.000 0.000 0.000 {_curses.curs_set}
1 0.000 0.000 0.000 0.000 you.py:17(<module>)
1 0.000 0.000 0.000 0.000 gzip.py:126(_init_write)
1 0.000 0.000 0.000 0.000 gzip.py:35(GzipFile)
3 0.000 0.000 0.000 0.000 {_struct.pack}
1 0.000 0.000 0.000 0.000 Game.py:35(Game)
1 0.000 0.000 0.000 0.000 {posix.read}
8 0.000 0.000 0.000 0.000 cell.py:51(__init__)
1 0.000 0.000 0.000 0.000 {posix.open}
10 0.000 0.000 0.000 0.000 cell.py:157(char)
1 0.000 0.000 0.000 0.000 UserDict.py:57(get)
1 0.000 0.000 0.000 0.000 {_ctypes.dlopen}
7 0.000 0.000 0.000 0.000 __future__.py:75(__init__)
1 0.000 0.000 0.000 0.000 {math.exp}
8 0.000 0.000 0.000 0.000 {_curses.init_pair}
1 0.000 0.000 0.000 0.000 Level.py:171(Rect)
1 0.000 0.000 0.000 0.000 fov.py:115(__Line)
5 0.000 0.000 0.000 0.000 cell.py:58(move)
1 0.000 0.000 0.000 0.000 cell.py:108(Door)
6 0.000 0.000 0.000 0.000 {method 'pop' of 'dict' objects}
2 0.000 0.000 0.000 0.000 unicurses.py:1773(noecho)
1 0.000 0.000 0.000 0.000 wrapper.py:8(<module>)
1 0.000 0.000 0.000 0.000 __init__.py:243(c_char_p)
1 0.000 0.000 0.000 0.000 {sys.exit}
1 0.000 0.000 0.000 0.000 {_curses.start_color}
1 0.000 0.000 0.000 0.000 cell.py:20(Cell)
2 0.000 0.000 0.000 0.000 {math.log}
4 0.000 0.000 0.000 0.000 cell.py:159(__init__)
3 0.000 0.000 0.000 0.000 __init__.py:104(CFunctionType)
3 0.000 0.000 0.000 0.000 __init__.py:481(CFunctionType)
1 0.000 0.000 0.000 0.000 Level.py:23(levGen)
1 0.000 0.000 0.000 0.000 AStar.py:21(node)
1 0.000 0.000 0.000 0.000 IO.py:26(IO)
1 0.000 0.000 0.000 0.000 __init__.py:320(CDLL)
1 0.000 0.000 0.000 0.000 random.py:643(WichmannHill)
1 0.000 0.000 0.000 0.000 cell.py:45(Stair)
1 0.000 0.000 0.000 0.000 {posix.close}
1 0.000 0.000 0.000 0.000 cell.py:151(Boulder)
1 0.000 0.000 0.000 0.000 {_ctypes.set_conversion_mode}
1 0.000 0.000 0.000 0.000 cell.py:63(Mob)
1 0.000 0.000 0.000 0.000 constants.py:18(<module>)
2 0.000 0.000 0.000 0.000 __init__.py:417(__init__)
1 0.000 0.000 0.000 0.000 random.py:793(SystemRandom)
1 0.000 0.000 0.000 0.000 __init__.py:159(py_object)
1 0.000 0.000 0.000 0.000 {time.time}
1 0.000 0.000 0.000 0.000 {binascii.hexlify}
1 0.000 0.000 0.000 0.000 __future__.py:74(_Feature)
1 0.000 0.000 0.000 0.000 __init__.py:376(PyDLL)
1 0.000 0.000 0.000 0.000 <string>:1(<module>)
1 0.000 0.000 0.000 0.000 cell.py:96(altar)
1 0.000 0.000 0.000 0.000 cell.py:145(cutlass)
1 0.000 0.000 0.000 0.000 UserDict.py:69(__contains__)
1 0.000 0.000 0.000 0.000 cell.py:137(item)
1 0.000 0.000 0.000 0.000 __init__.py:1(<module>)
1 0.000 0.000 0.000 0.000 __init__.py:416(LibraryLoader)
1 0.000 0.000 0.000 0.000 you.py:17(Player)
1 0.000 0.000 0.000 0.000 {method 'fileno' of 'file' objects}
2 0.000 0.000 0.000 0.000 {_curses.noecho}
1 0.000 0.000 0.000 0.000 __init__.py:238(c_char)
1 0.000 0.000 0.000 0.000 cell.py:129(secretDoor)
1 0.000 0.000 0.000 0.000 Game.py:600(logWrite)
1 0.000 0.000 0.000 0.000 __init__.py:205(c_longdouble)
1 0.000 0.000 0.000 0.000 cell.py:83(Newt)
1 0.000 0.000 0.000 0.000 fov.py:148(__ViewBump)
1 0.000 0.000 0.000 0.000 {method 'get' of 'dictproxy' objects}
1 0.000 0.000 0.000 0.000 __init__.py:233(c_byte)
1 0.000 0.000 0.000 0.000 __init__.py:278(c_wchar)
1 0.000 0.000 0.000 0.000 UserDict.py:17(__getitem__)
1 0.000 0.000 0.000 0.000 __init__.py:197(c_float)
1 0.000 0.000 0.000 0.000 __init__.py:176(c_long)
1 0.000 0.000 0.000 0.000 __init__.py:347(_FuncPtr)
1 0.000 0.000 0.000 0.000 __init__.py:219(c_ulonglong)
1 0.000 0.000 0.000 0.000 fov.py:154(__View)
1 0.000 0.000 0.000 0.000 {_locale.nl_langinfo}
1 0.000 0.000 0.000 0.000 _endian.py:22(_swapped_meta)
1 0.000 0.000 0.000 0.000 _endian.py:45(BigEndianStructure)
1 0.000 0.000 0.000 0.000 you.py:24(__init__)
1 0.000 0.000 0.000 0.000 __init__.py:172(c_ushort)
1 0.000 0.000 0.000 0.000 __init__.py:168(c_short)
1 0.000 0.000 0.000 0.000 __init__.py:226(c_ubyte)
1 0.000 0.000 0.000 0.000 IO.py:52(retSceen)
1 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects}
1 0.000 0.000 0.000 0.000 __init__.py:260(c_bool)
1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
1 0.000 0.000 0.000 0.000 __init__.py:255(c_void_p)
1 0.000 0.000 0.000 0.000 __init__.py:201(c_double)
1 0.000 0.000 0.000 0.000 {method 'isalnum' of 'str' objects}
1 0.000 0.000 0.000 0.000 __init__.py:180(c_ulong)
1 0.000 0.000 0.000 0.000 __init__.py:215(c_longlong)
1 0.000 0.000 0.000 0.000 __init__.py:275(c_wchar_p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment