Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change immutable map implementation #1175

Closed
Horusiath opened this issue Jul 22, 2015 · 6 comments
Closed

Change immutable map implementation #1175

Horusiath opened this issue Jul 22, 2015 · 6 comments

Comments

@Horusiath
Copy link
Contributor

Right now our IImmutableMap<TKey, TValue> implementation is based on AVL trees. It's used i.e. in child actors containers. However it has some known perf issues when it comes to adding new child actors. Also current impl doesn't support range queries, which will be highly desirable i.e. in Akka.Cluster.Tools plugin.

The idea is to switch implementation to Red-Black trees (like the ones used in Scala implementation). Any other ideas? @akkadotnet/developers

@rogeralsing
Copy link
Contributor

We should give this a try imo. the AVL tree is horribly slow when inserting a lot of children.

@Aaronontheweb
Copy link
Member

Related? #1202

@kbaldyga
Copy link

Hi, I have been playing with the Red-Black tree implementation for the last few days. It's not complete yet, but you can check out the current code here: https://github.com/kbaldyga/Tree

Before (if) I start working on a pull-request integrating this with akka.net, I have few questions:

  • Is F# code acceptable?
  • I don't know much about akka.net. @rogeralsing, when you are saying "AVL tree is horribly slow when inserting a lot of children", is there a specific number of children you have in mind? Hundreds? Thousands? Millions? What is the desired speed improvement? 5%? 500%? Doesn't matter, as long as it fixes the null reference exception?
  • @Horusiath what would be the interface for those range queries you have in mind? Would you like to see a 1-to-1 copy of the current scala implementation? Something different?

@Aaronontheweb
Copy link
Member

Is F# code acceptable?

It'd need to be in C# so we can integrate it into the core library (C#)

@boekabart
Copy link
Contributor

The AVL null ref exception is fixed in PR #1645 . Other reasons obviously stand.

@Aaronontheweb
Copy link
Member

Resolved as part of #1676

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

No branches or pull requests

5 participants