Skip to content

Please support custom allocators and runtime comparators #3

@jeaye

Description

@jeaye

Hi! I hope you're doing well. Thanks so much for making BppTree.

As mentioned here, I've integrated BppTree into jank, the native Clojure dialect on LLVM. There are two main blockers for shipping jank with BppTree.

  1. BppTree doesn't support custom allocators, while jank is using a GC; this means that any BppTree allocated in a GC allocated object will never be destructed, which will result in leaks; if BppTree were to support custom allocators, the GC would then be able to follow those pointers and clean things up as needed. Note that immer uses policies for this to good effect: https://sinusoid.es/immer/memory.html#example-tracing-garbage-collection.
  2. BppTree doesn't support runtime comparators. That is, we may know the type of a comparator at compile-time, but not the value of the function itself. This is necessary to support functionality such as sorted-map-by, in Clojure.

Is there any interest in supporting these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions