Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Sorted collections #11

Closed
alexeyshockov opened this issue May 14, 2012 · 1 comment
Closed

Sorted collections #11

alexeyshockov opened this issue May 14, 2012 · 1 comment

Comments

@alexeyshockov
Copy link
Owner

Optimizations and interface for sorted collections.

Interface:

  • sorted set builder,
  • sorted collection builder,
  • sorted map builder.

Thoughts on implementation: collect (as is), sort in build().

Optimizations:

  • binary search (Collection::contains(), Map::containsKey()).
@alexeyshockov
Copy link
Owner Author

Binary search cannot be implemented on abstract iterator. Implemented only available on some indexed storage, i.e. only after creating (with builder) or freezing (with __clone()), when SplFixedArray available.

Low priority.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant