← Back to all sparks
F

fastplyr

ANALYTICS
Velocity0.0

Fast Alternatives to tidyverse Functions

A fast dplyr stand-in that keeps finding new places to skip work entirely.

dataframe-performancedplyr-alternativequery-optimizationcran-policyr-package
Current state
fastplyr reimplements the dplyr verbs on a faster backend, exposing f_summarise, f_mutate, f_reframe and a set of group metadata helpers alongside optimized joins and quantiles. The most recent release removes non-API C functions and raises the floor to R 4.5.0, a steep requirement that follows the C++17 requirement introduced a release earlier. The verb surface itself has been stable since 0.9.0.
Where it's heading
The optimization strategy has shifted from making individual functions fast to reasoning about expressions before evaluating them — 0.9.9 began marking simple operators as group-unaware so expressions built only from them are evaluated across the whole data frame rather than per group. That is a structural bet: the package increasingly inspects what you wrote to decide how much work is actually needed. Running alongside it is a steady tightening of build requirements, with C++17, R 4.5.0 and CRAN's C API rules all landing within a year.
Prediction
Expect the group-unaware classification to widen to more functions, since each addition compounds across every grouped expression, and expect the dependency floors to keep rising as the package tracks CRAN's compiled-code policy.

Recent moves

  1. 4mo ago

    Non-API C functions dropped, R 4.5.0 now required

    Removes non-API C functions in line with CRAN's tightening of permitted entry points, at the cost of requiring R 4.5.0 — a demanding floor for users on institutional or older installations. Compliance work with a real adoption cost attached.

    View source ↗
  2. 8mo ago

    In-place sorting arrives with a C++17 requirement

    Gives f_arrange an .in_place argument to sort data frames without copying, and raises the compiler requirement to C++17 while clearing rchk issues flagged on CRAN. In-place mutation is an unusual affordance in R and fits the package's willingness to trade conventions for speed.

    View source ↗
  3. 10mo ago

    Group-unaware expressions evaluated on the whole frame

    Marks simple operators and math functions as group-unaware so an expression built only from them, such as (x + y) / abs(z), is evaluated across the entire data frame rather than group by group — a large win on heavily grouped data. Expressions mixing in anything unmarked, like cumsum(), fall back to normal evaluation. The most consequential change in this feed, and the start of the package inspecting expressions rather than just executing them.

    View source ↗
  4. 1y ago

    f_mutate and f_reframe complete the verb set

    Adds f_mutate and f_reframe as alternatives to their dplyr counterparts, optimizes common expressions such as sum() and mean() inside f_summarise, and exposes fast group metadata helpers. The release where the package stopped being a partial replacement and covered the verbs people actually reach for.

    View source ↗
  5. 1y ago

    Dynamic argument evaluation and f_pull

    Adds list_tidy for building lists that give precedence to objects created within them, makes new_tbl and f_expand evaluate arguments dynamically, and introduces f_pull plus NA row-removal helpers. Also fixes f_summarise returning results in the wrong order and removes previously soft-deprecated arguments.

    View source ↗
  6. 1y ago

    f_fill added and grouped joins repaired

    Adds f_fill for filling NA values forwards and backwards by group, speeds up f_bind_rows, and fixes joins that errored when both sides were grouped data frames. Random seeding moves out to cheapr::with_local_seed(), continuing the pattern of delegating to the maintainer's lower-level package.

    View source ↗