-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use generics and go1.23 iterators (#26)
Use generics and go1.23 iterators - Store specific types of values, using generics to specify type. - Replace iterators (Walk, WalkPath, Iterator) with go1.23 iterators. This allows ranging over key-value pairs. - Update README.md
- Loading branch information
Showing
10 changed files
with
317 additions
and
507 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
/* | ||
Package radixtree implements an Adaptive Radix Tree, aka compressed trie or | ||
compact prefix tree. It is adaptive in the sense that nodes are not constant | ||
size, having as few or many children as needed to branch to all subtrees. | ||
This package implements a radix-256 tree where each key symbol (radix) is a | ||
byte, allowing up to 256 possible branches to traverse to the next node. | ||
The implementation is optimized for Get performance and allocates 0 bytes of | ||
heap memory per Get; therefore no garbage to collect. Once the radix tree is | ||
built, it can be repeatedly searched quickly. Concurrent searches are safe | ||
since these do not modify the radixtree. Access is not synchronized (not | ||
concurrent safe with writes), allowing the caller to synchronize, if needed, in | ||
whatever manner works best for the application. | ||
The API uses string keys, since strings are immutable and therefore it is not | ||
necessary make a copy of the key provided to the radix tree. | ||
*/ | ||
// Package radixtree implements an Adaptive Radix Tree, aka compressed trie or | ||
// compact prefix tree. It is adaptive in the sense that nodes are not constant | ||
// size, having as few or many children as needed to branch to all subtrees. | ||
// | ||
// This package implements a radix-256 tree where each key symbol (radix) is a | ||
// byte, allowing up to 256 possible branches to traverse to the next node. | ||
// | ||
// The implementation is optimized for read performance and allocates zero | ||
// bytes of heap memory for read oprations. Once the radix tree is built, it | ||
// can be repeatedly searched quickly. Concurrent searches are safe since these | ||
// do not modify the radixtree. Access is not synchronized (not concurrent safe | ||
// with writes), allowing the caller to synchronize, if needed, in whatever | ||
// manner works best for the application. | ||
// | ||
// The API uses string keys, since strings are immutable and therefore it is | ||
// not necessary make a copy of the key provided to the radix tree. | ||
package radixtree |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/gammazero/radixtree | ||
|
||
go 1.21 | ||
go 1.23 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.