You'd probably better explain in English which things truly need to be
compared with what. Right now, your first version is, I believe, an O(n^4)
algorithm, which is extremely expensive, while your second (set-based)
version appears to be O(n^3), which is quite a bit better, but still not
stellar.
Christian Doll wrote:
> i have e little performance problem with my code...
>
> i have to compare many lists of very much floats. at moment i have
> nested for-loops
>
> for a in range( len(lists) ):
> for b in range( a+1 , len(lists) ):
> for valuea in lists[a]:
> equal=
Hello,
i have e little performance problem with my code...
i have to compare many lists of very much floats. at moment i have
nested for-loops
for a in range( len(lists) ):
for b in range( a+1 , len(lists) ):
for valuea in lists[a]:
equal=False
for valueb in lists
Hello,
i have e little performance problem with my code...
i have to compare many lists of very much floats. at moment i have
nested for-loops
for a in range( len(lists) ):
for b in range( a+1 , len(lists) ):
for valuea in lists[a]:
equal=False
for valueb in l