HashTableOf[X] [message #1142049] |
Thu, 17 October 2013 11:12 |
Nikolay Metchev Messages: 15 Registered: July 2009 |
Junior Member |
|
|
Hello Everyone,
I have been looking around the code in Eclipse source code and have come across something quite strange:
There seems to be a whole bunch of HashTableOf[X] classes in the org.eclipse.jdt.internal.compiler.util package. I am trying to figure out if the code would benefit by replacing them with a normal java.util.HashMap.
In particular I can't see any benefit of HashTableOfObject over HashMap - containsKey() in particular is O(N) rather then O(1). I suppose the primitive versions such as HashTableOfInt avoids boxing but I am not sure this was the thinking when they were created.
Another worrying thing is that they are located in the compiler.util package but they seem to be used all over the place (outside the scope of the compiler).
Any thoughts?
|
|
|
Powered by
FUDForum. Page generated in 0.02424 seconds