Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #634 from eulerkochy/swissdict
SwissDict
- Loading branch information
Showing
10 changed files
with
1,050 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
```@meta | ||
DocTestSetup = :(using DataStructures) | ||
``` | ||
|
||
# SwissDict | ||
|
||
`SwissDict` provides a standard dictionary, conforming to the AbstractDict protocol, which is inspired from SwissTable developed by Google. This provides improved performance over Dict at extremely high Load Factor. | ||
|
||
The interface of `SwissDict` replicates that of `Dict`. | ||
|
||
Examples: | ||
|
||
```jldoctest | ||
julia> d = RobinDict{Int, Char}(1 => 'a', 2 => 'b') | ||
SwissDict{Int64,Char} with 2 entries: | ||
1 => 'a' | ||
2 => 'b' | ||
julia> d[3] = 'c'; | ||
julia> collect(d) | ||
3-element Array{Pair{Int64,Char},1}: | ||
1 => 'a' | ||
2 => 'b' | ||
3 => 'c' | ||
julia> delete!(d, 2); | ||
julia> d[1] | ||
'a': ASCII/Unicode U+0061 (category Ll: Letter, lowercase) | ||
julia> d | ||
SwissDict{Int64,Char} with 2 entries: | ||
1 => 'a' | ||
3 => 'c' | ||
julia> pop!(d) | ||
1 => 'a' | ||
``` | ||
|
||
```@meta | ||
DocTestSetup = nothing | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.