Skip to content

Speed up Rcpp_eval() #578

Description

@krlmlr

I wonder if it's possible to speed up Rcpp_eval(), e.g., by making use of R_ErrorHook. The current implementation seems to wrap an evalq call in a tryCatch at the R level. I understand that we can't simply use Rf_eval() because our destructors won't be called.

Motivation: Introducing Rcpp_eval() instead of Rf_eval() has made dplyr one order of magnitude slower for some operations:

download 1

Here's the offending commit: tidyverse/dplyr@7ea10. The plot shows only an excerpt of the whole history, but the weak performance is still present in dplyr's current master.

Related: tidyverse/dplyr#2220.

CC @hadley @kevinushey @romainfrancois.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions