-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put the code in src/ + update READMEs
- Loading branch information
1 parent
7381718
commit f5f9d9b
Showing
15 changed files
with
146 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,10 @@ | ||
To test the tree type | ||
|
||
$ make | ||
|
||
and then | ||
|
||
$ ./test | ||
|
||
It checks the correctness of the code. Tests until valgrind (with the | ||
--leak-check=full flag) report no leaks. |
File renamed without changes.
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
File renamed without changes.
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,10 @@ | ||
To test the tree type | ||
|
||
$ make | ||
|
||
and then | ||
|
||
$ ./test | ||
|
||
It checks the correctness of the code. Tests until valgrind (with the | ||
--leak-check=full flag) report no leaks. |
File renamed without changes.
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
File renamed without changes.
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,24 @@ | ||
To run performance tests type | ||
|
||
$ make | ||
|
||
and then | ||
|
||
$ ./test | ||
|
||
The results for this preliminary implementation of Zip Trees are | ||
already very interesting. On my computer the insertion into Zip Trees | ||
(in random order) is only about 50% slower than for Red-Black | ||
trees. Interestingly, insertion in sorted order is usually slightly | ||
faster for Zip Trees. | ||
|
||
As for searching and deleting, on my machine the Zip Trees are only | ||
about 15-25% slower than Red-Black trees. | ||
|
||
Perhaps further engineering of Zip Trees can yield some improvements, | ||
e.g., eliminating recursion in the insertion. I studied a bit the | ||
Reb-Black tree implementation in the C++ standard library and found | ||
that most functions are re-written into iterative versions, e.g., see | ||
the _Rb_tree_insert_and_rebalance function in | ||
|
||
github.com/gcc-mirror/gcc/blob/master/libstdc++-v3/src/c++98/tree.cc |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.