Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #79

Closed
jeroen opened this issue Jul 1, 2017 · 1 comment
Closed

Performance #79

jeroen opened this issue Jul 1, 2017 · 1 comment

Comments

@jeroen
Copy link
Member

jeroen commented Jul 1, 2017

Update my initial diagnosis was wrong. It looks like somewhere there is some warm-up required:

> library(evaluate)
> options(device = function(file, ...){
+   pdf(NULL, ...)
+ })
>
> cl <- call("rnorm", 10)
>
> system.time(evaluate(cl))
   user  system elapsed
  0.107   0.005   0.113
> system.time(evaluate(cl))
   user  system elapsed
  0.118   0.003   0.123
> system.time(evaluate(cl))
   user  system elapsed
  0.002   0.000   0.002
> system.time(evaluate(cl))
   user  system elapsed
  0.003   0.000   0.005

This happens very consistently. The first two calls to evaluate() have about 100ms extra overhead.

@hadley
Copy link
Member

hadley commented Jun 14, 2024

I only see a slow down of ~20ms the first time evaluate is called in a session. I suspect it's because some package is getting loaded, or there's some other startup cost.

@hadley hadley closed this as completed Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants