git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
1139df0
)
small speadup for ListType.read
author
Forrest Voight
<forrest@forre.st>
Wed, 28 Nov 2012 07:47:22 +0000 (
02:47
-0500)
committer
Forrest Voight
<forrest@forre.st>
Wed, 28 Nov 2012 07:47:22 +0000 (
02:47
-0500)
p2pool/util/pack.py
patch
|
blob
|
history
diff --git
a/p2pool/util/pack.py
b/p2pool/util/pack.py
index
0c50fc2
..
9037580
100644
(file)
--- a/
p2pool/util/pack.py
+++ b/
p2pool/util/pack.py
@@
-161,10
+161,9
@@
class ListType(Type):
def read(self, file):
length, file = self._inner_size.read(file)
- res = []
+ res = [None]*length
for i in xrange(length):
- item, file = self.type.read(file)
- res.append(item)
+ res[i], file = self.type.read(file)
return res, file
def write(self, file, item):