Skip to content

Consider pushing 1-D density/histogram binning into the Rust backend #4

Description

@schochastics

add_marginal() (and mark_density() / mark_histogram()) currently compute the KDE / bins in R via stats::density() and .stat_bin() (see R/compile-stat.R). For very large data this could mirror the existing Rust 2-D binning (rs_aggregate_2d in the vellum backend's src/rust/src/aggregate.rs) with a 1-D fast path.

This is an optional performance enhancement, not a correctness prerequisite — the R implementation is exact and fine for typical sizes. Worth revisiting if profiling shows the 1-D stats becoming a bottleneck on large marginals/histograms.

Context: added in the add_marginal() feature (marginal distributions along the top/right panel edges, the ggMarginal analogue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions