Cargo Features

[dependencies]
fnntw = { version = "0.4.1", default-features = false, features = ["timing", "parallel", "sqrt-dist2", "no-position", "no-index", "tcmallocator", "mimalloc", "jemallocator", "snmalloc-rs", "rpmalloc"] }
default = no-index, no-position, parallel, sqrt-dist2

These default features are set whenever fnntw is added without default-features = false somewhere in the dependency tree.

timing

Dev feature

parallel default = rayon

Enables parallel query methods and parallel median of medians

sqrt-dist2 default

Apply square root to squared euclidean distance, returning the euclidean distance

no-position default no-index

Omits neighbor position

Affects utils::QueryResult, utils::QueryKResult, utils::QueryKAxisResult

no-index default = no-position

Omits index and only returns distances. Also does not return position.

Affects utils::QueryKAxisResult

tcmallocator

This was found to be the best performing allocator but is not supported on all systems

Enables tcmalloc

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

mimalloc implicit feature

Enables mimalloc

mimalloc:

Performance and security oriented drop-in allocator

tcmalloc tcmallocator?
jemallocator implicit feature

Enables jemallocator

jemallocator:

A Rust allocator backed by jemalloc

snmalloc-rs implicit feature

Enables snmalloc-rs

snmalloc-rs:

rust bindings of snmalloc

rpmalloc implicit feature

Enables rpmalloc

rpmalloc:

Cross-platform global memory allocator using rpmalloc

rayon parallel