Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

Commit

Permalink
Port of @JeffBezanson's OrderedDict
Browse files Browse the repository at this point in the history
* JuliaLang/julia#10116
* This is largely copy and paste + rename, fixups
* Offers good speed improvements in OrderedDict iteration,
  small improvements elsewhere
  • Loading branch information
kmsquire committed Jan 17, 2016
1 parent 28f57d3 commit 9660c44
Show file tree
Hide file tree
Showing 5 changed files with 482 additions and 109 deletions.
6 changes: 6 additions & 0 deletions src/dictsupport.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# support function

# This is defined in Base, but probably not meant for external consumption,
# so it's redefined here.
_tablesz(x::Integer) = x < 16 ? 16 : one(x)<<((sizeof(x)<<3)-leading_zeros(x-1))

2 changes: 1 addition & 1 deletion src/hashdict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Base: KeyIterator, ValueIterator, haskey, get, getkey, delete!,
pop!, empty!, filter!, setindex!, getindex, similar,
sizehint!, length, filter, isempty, start, next, done,
keys, values, _tablesz, skip_deleted, serialize, deserialize
keys, values, skip_deleted, serialize, deserialize

import Base.Serializer: serialize_type
const SerState = Base.Serializer.SerializationState
Expand Down
Loading

0 comments on commit 9660c44

Please sign in to comment.