ext-ds
bst
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ext-ds
-
Exploring the design space of binary search trees
I started this project many years ago when I was coming up with ideas for immutable data structures for the PHP data structures extension: https://github.com/php-ds/ext-ds. I wanted to support access by position in a sorted set, which led to the idea of using binary search trees for both lists and sets. However, I did not expect the scope of this project to increase as much as it did.
The more I read about binary search trees, the more I thought about them, and so down the rabbit hole I went.
-
Make your PHP arrays sweet'n'safe
You're being downvoted by people who evidently aren't aware there are alternatives.
-
php-ds extension
The Github repo hasn't had a new release since 2019, with just one guy being the primary maintainer
-
Poll: usage of the Data Structures extension
This is actually a 3rd party extension, that's why it isn't in core.
- Weekly "ask anything" thread
- What third-party extension or library would you like to see included in php as default?
bst
-
Exploring the design space of binary search trees
If you like this article then you might also be interested in: https://github.com/c-blake/bst interesting
It's ANSI C with a bespoke macro generics system not Go, does not cover as many balancing rules, and is not written up as nicely. It does do something only weakly represented in your Go impls, AFAICT - "binary symmetry" - the reflection about left-right intrinsic to most ideas in this area. (Mehlhorn has a book that does this, but that is the only other source I know.) It also has API considerations like seek-edit separation and how to handle in-tree duplicate key FIFO/LIFO/etc (as opposed to values which are also collections).
Also, Re: B-trees among several comments - edit heavy B-trees with large nodes (driven by IO bandwidth-delay products) need some "mini-scalable" structure for their nodes since shifting (on average) half the entries can cost. That mini-scale could be another B-tree or it could be a binary search tree, perhaps adjusted to have 2-byte sized pointers into the little arena that is a node if 64Knode is enough. I once heard Sybase (now Microsoft SQL Server?) used skip lists. Anyway, this may be a remaining use case for binary trees even in the presence of a B-tree.
-
The Rust compiler has gotten faster again
While I agree the common pattern is to use void*/dynamic dispatch, this is not necessary. E.g., https://github.com/glouw/ctl/ or https://github.com/c-blake/bst show a couple ways to have generic code statically specialized in regular old C.
What are some alternatives?
php-ext-xlswriter - 🚀 PHP Extension for creating and reader XLSX files.
bst - Exploring the design space of binary search trees
scalar_objects - Extension that adds support for method calls on primitive types in PHP
ctl - The C Template Library
PHPT - The PHP Interpreter
pyc - A Python to C compiler
swoole-cli - SWOOLE-CLI is a php binary distribution composed swoole & php-core & cli & fpm and mostly of common extensions.
polyfill - Compatibility polyfill
tests
mess - Make your PHP arrays sweet'n'safe