Skip to content

use a heap instead of sorteddict? #385

Open
@lilydjwg

Description

@lilydjwg

I see trio depends on sortedcontainers solely because it needs a priority queue for sorting deadlines and the similar, and the Python standard library has one (heapq) for that exact purpose.

Pros:

  • one less dependency
  • it's (at least) slightly faster (13.29s vs 12.97s running the tests; it varies but the fastest sortedcontainers one took the same time as the slowest heap one)

Cons:

  • may introduce bugs
  • I have only a rough implementation, need some work to send a pull request

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions