TimSort broken

53 views
Skip to first unread message

Nils Kilden-Pedersen

unread,
Feb 27, 2015, 9:28:30 PM2/27/15
to scala-user

Not sure if Scala uses TimSort independently of the JDK implementation.

http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/

The reaction of the Java developer community to our report is somewhat disappointing: instead of using our fixed (and verified!) version of mergeCollapse(), they opted to increase the allocated runLen “sufficiently”. As we showed, this is not necessary. In consequence, whoever uses java.utils.Collection.sort() is forced to over allocate space”

WTF?

Rex Kerr

unread,
Feb 27, 2015, 9:45:17 PM2/27/15
to Nils Kilden-Pedersen, scala-user
Scala uses it via the JDK.  It would also be good to know how _much_ space is over-allocated.

  --Rex

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages