Closed leventov closed 8 years ago
duplicate of #636?
From my point of view that makes absolute no sense to be able to compare two CtElements. What does it mean?
Only the position of two elements are comparable. I thing it is better the replace the TreeSet/TreeMap by HashSet/HashMap or use the position of the element in the compareTo but what is the position of a new CtElement...
@tdurieux I totally support this, just trying to optimize compareTo() for the current set or requirements. Going through the whole codebase and removing all TreeMaps/TreeSets is not something that could be PR'ed from outside. But if you or @monperrus or @GerardPaligot do this I would be happy.
I also agree.
Two solutions:
1; Removing Comparable Pb: huge change in the code base (all TreeSet), breaks a lot of client code
I prefer the second solution, esp. if we can clearly measure the performance gain.
Closing this one, we have #636
it should be based on
BiScanner
.Here is my version of CompareToScanner, it is based on the different version of BiScanner than commited into the repo, but still that might help: