nodes: micro-optimize hash(node)
Turns out it's called alot, and saving the function call makes it faster.
This commit is contained in:
parent
fcc473ab1c
commit
5702c86f4c
|
@ -216,7 +216,7 @@ class Node(metaclass=NodeMeta):
|
||||||
return self._nodeid
|
return self._nodeid
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash(self.nodeid)
|
return hash(self._nodeid)
|
||||||
|
|
||||||
def setup(self):
|
def setup(self):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue