Conversation
timholy
left a comment
There was a problem hiding this comment.
I would approve having this here.
|
@timholy do you think I should abstract the |
|
Ok, I am done. The tests on the Frozen LittleDict are rather simple, but I think it is enough. I think there is a bit more that can be done to make FrozenLittleDicts a bit faster, |
|
I microoptimized I don't care so much about the performance of |
kmsquire
left a comment
There was a problem hiding this comment.
Looks good to me. Left some minor comments.
|
Once the length check is in or argued to be unnecessary, I'm good with this, no need for further review. |
|
Length check addded, I got enthused and added better use of the type system to ensure we never tried to mutate unmutable things. The tests don't test the unhappy path very well. |
kmsquire
left a comment
There was a problem hiding this comment.
One small change needed for tests to pass on 32-bit systems.
|
Ready for merge |
This PR adds a new type
LittleDict.It is optized for small numbers of elements
My timing on a earlier version* had it hitting parity with
OrderedDictforSymbolkeys, at 30 elements when backed with aVectoror 50 elements when backed with aTuple.I would like to put it in OrderedCollections.jl because
OrderedDictright now, would be better off usingLittleDict. (Basically all my . previous uses. Though I may be a nonrepresentative sample.)TODO is tests, and a bit more API, esp constructors.
But I will let the tests driive those.
I want to basically reuse the OrderedDict tests, (except the ones that involve 10,000 elements)
but I am undecided as to if that should be via copy-paste,
or via adding abstraction to the current testset.