Open GimmickNG opened 2 years ago
After doing some digging, it seems this is a known issue:
likely because of the use of quicksort instead of e.g. timsort: https://github.com/pfalcon/pycopy/blob/d590892d235cdb318d0b830c1cedb6b81dad16d2/py/objlist.c#L361-L363
The
sorted()
function is not stable. Example:In CPython:
The order of the IDs is ascending (unaffected) in CPython whereas it is shuffled in Pycopy.