mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-05-13 03:00:24 -04:00
Fix quadratic runtime of sint.concat
This commit is contained in:
@@ -3190,7 +3190,10 @@ class sint(_secret, _int):
|
||||
def concat(cls, parts):
|
||||
parts = list(parts)
|
||||
res = cls(size=sum(len(part) for part in parts))
|
||||
args = sum(([len(part), part] for part in parts), [])
|
||||
args = []
|
||||
for part in parts:
|
||||
args.append(len(part))
|
||||
args.append(part)
|
||||
concats(res, *args)
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user