-
Notifications
You must be signed in to change notification settings - Fork 4
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
NOTE: stopifnot() comes with some overhead and is getting slower in R (>= 3.5.0) #70
Comments
... and follow up note from 2018-03-15: Ouch... in R-devel, > source("stopifnot.R")
Unit: microseconds
expr min lq mean median uq max
stopifnot(is.numeric(x), length(x) == 1e+06) 15.308 15.7010 17.50978 15.9335 16.3295 71.253
stopifnot2(is.numeric(x), length(x) == 1e+06) 1.489 1.6425 1.90277 1.7815 1.9605 8.348
neval
100
100 which is due to a complete rewrite using |
I've moved to using a private, simpler barebone |
Well, that version uses |
Pasting in my old private notes to myself here:
Date: Sun, Sep 11, 2016, 22:16
Subject: R SPEEDUP: stopifnot()
stopifnot()
is always callingmatch.call()
even when there are no error. It adds unnecessary overhead.The text was updated successfully, but these errors were encountered: