Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-cidranger
Commits
73cd71b0
Commit
73cd71b0
authored
Aug 29, 2017
by
Yulin
Committed by
GitHub
Aug 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
b9141f82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
6 deletions
+33
-6
README.md
README.md
+33
-6
No files found.
README.md
View file @
73cd71b0
...
...
@@ -43,12 +43,39 @@ containingNetworks, err = ranger.ContainingNetworks(net.ParseIP("128.168.1.0"))
### Benchmark results comparing hit/miss for LPC trie vs brute force implementation, using AWS published ip ranges.
```
BenchmarkLPCTrieHitUsingAWSRanges-4 5000000 314.0 ns/op
BenchmarkBruteRangerHitUsingAWSRanges-4 100000 14005.0 ns/op
BenchmarkLPCTrieMissUsingAWSRanges-4 20000000 82.1 ns/op
BenchmarkBruteRangerMissUsingAWSRanges-4 50000 24422.0 ns/op
BenchmarkLPCTrieHitIPv4UsingAWSRanges-4 3000000 389 ns/op
BenchmarkLPCTrieHitIPv6UsingAWSRanges-4 10000000 149 ns/op
BenchmarkBruteRangerHitIPv4UsingAWSRanges-4 100000 14879 ns/op
BenchmarkBruteRangerHitIPv6UsingAWSRanges-4 300000 3339 ns/op
BenchmarkLPCTrieMissIPv4UsingAWSRanges-4 20000000 100 ns/op
BenchmarkLPCTrieHMissIPv6UsingAWSRanges-4 10000000 120 ns/op
BenchmarkBruteRangerMissIPv4UsingAWSRanges-4 50000 25367 ns/op
BenchmarkBruteRangerMissIPv6UsingAWSRanges-4 100000 11146 ns/op
```
### Example of IPv6 trie:
```
::/0 (target_pos:127:has_entry:false)
| 0--> 2400::/14 (target_pos:113:has_entry:false)
| | 0--> 2400:6400::/22 (target_pos:105:has_entry:false)
| | | 0--> 2400:6500::/32 (target_pos:95:has_entry:false)
| | | | 0--> 2400:6500::/39 (target_pos:88:has_entry:false)
| | | | | 0--> 2400:6500:0:7000::/53 (target_pos:74:has_entry:false)
| | | | | | 0--> 2400:6500:0:7000::/54 (target_pos:73:has_entry:false)
| | | | | | | 0--> 2400:6500:0:7000::/55 (target_pos:72:has_entry:false)
| | | | | | | | 0--> 2400:6500:0:7000::/56 (target_pos:71:has_entry:true)
| | | | | | | | 1--> 2400:6500:0:7100::/56 (target_pos:71:has_entry:true)
| | | | | | | 1--> 2400:6500:0:7200::/56 (target_pos:71:has_entry:true)
| | | | | | 1--> 2400:6500:0:7400::/55 (target_pos:72:has_entry:false)
| | | | | | | 0--> 2400:6500:0:7400::/56 (target_pos:71:has_entry:true)
| | | | | | | 1--> 2400:6500:0:7500::/56 (target_pos:71:has_entry:true)
| | | | | 1--> 2400:6500:100:7000::/54 (target_pos:73:has_entry:false)
| | | | | | 0--> 2400:6500:100:7100::/56 (target_pos:71:has_entry:true)
| | | | | | 1--> 2400:6500:100:7200::/56 (target_pos:71:has_entry:true)
| | | | 1--> 2400:6500:ff00::/64 (target_pos:63:has_entry:true)
| | | 1--> 2400:6700:ff00::/64 (target_pos:63:has_entry:true)
| | 1--> 2403:b300:ff00::/64 (target_pos:63:has_entry:true)
```
### TODO
*
Implement level-compressed component of LPC trie ranger.
*
Add support for IPv6
*
Implement level-compressed component of LPC trie ranger
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment