Rust NIF-accelerated backend for ExDataSketch.
Delegates batch and full-state traversal operations to Rust NIFs for
performance, while falling back to ExDataSketch.Backend.Pure for
lightweight operations like new, single update, and point queries.
Availability
This backend is only available when the Rust NIF has been compiled.
Check with ExDataSketch.Backend.Rust.available?/0.
Dirty Scheduler Thresholds
Batch operations automatically use dirty CPU schedulers when the input size exceeds configurable thresholds. Defaults:
hll_update_many: 10,000 hashesull_update_many: 10,000 hashesull_merge: 50,000 registers (m = 2^p)ull_estimate: 50,000 registers (m = 2^p)cms_update_many: 10,000 pairstheta_update_many: 10,000 hashescms_merge: 100,000 total counterstheta_compact: 50,000 entriestheta_merge: 50,000 combined entrieskll_update_many: 10,000 valueskll_merge: 50,000 combined itemsddsketch_update_many: 10,000 valuesddsketch_merge: 50,000 combined countfi_update_many: 10,000 itemsfi_merge: 50,000 combined entriesfi_nif_query: 256 (k threshold forfi_top_k/fi_estimate; below this, Pure is used)
Override globally via application config:
config :ex_data_sketch, :dirty_thresholds, %{
hll_update_many: 5_000,
cms_update_many: 20_000
}Or per-call via the :dirty_threshold option.
Summary
Functions
Returns true if the Rust NIF is loaded and available.
Functions
@spec available?() :: boolean()
Returns true if the Rust NIF is loaded and available.
Examples
iex> is_boolean(ExDataSketch.Backend.Rust.available?())
true