[Rd] Argument error reporting slowness

From: McGehee, Robert <Robert.McGehee_at_geodecapital.com>
Date: Wed 01 Nov 2006 - 01:15:05 GMT


Hello,
My work with large datasets slows down a fair amount in R 2.4.0 when I mistakenly pass in a large dataset using an incorrect argument. That is, the same error message for reporting an incorrect argument usage when I pass in a 1e8 length matrix takes 3 minutes on R 2.4.0 versus 0.01 seconds on R 2.3.1 This slowness may be an unintentional side effect of a creating a better error message for reporting bad arguments. For even larger data sets, I have chosen to kill my R session rather than wait out this error if mis-typing an argument name.

For instance,
## In R 2.3.1, immediate reporting
> system.time(cor(badArg = matrix(1:1e8)))
Error in cor(badArg = matrix(1:1e+07)) : unused argument(s) (badArg ...) Timing stopped at: 0 0.01 0.02 NA NA

## In R 2.4.0, extremely slow
> system.time(cor(badArg = matrix(1:1e8)))
Error in cor(badArg = matrix(1:1e+08)) : unused argument(s) (badArg =

c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, Timing stopped at: 175.84 1.546 177.423 0 0

Best,
Robert

platform       x86_64-unknown-linux-gnu                   
arch           x86_64                                     
os             linux-gnu                                  
system         x86_64, linux-gnu                          
status         Patched                                    
major          2                                          
minor          4.0                                        
year           2006                                       
month          10                                         
day            03                                         
svn rev        39576                                      
language       R                                          
version.string R version 2.4.0 Patched (2006-10-03 r39576)

Robert McGehee
Quantitative Analyst
Geode Capital Management, LLC
1 Post Office Square, 28th Floor | Boston, MA | 02109 Tel: 617/392-8396 Fax:617/476-6389
mailto:robert.mcgehee@geodecapital.com

This e-mail, and any attachments hereto, are intended for us...{{dropped}}



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Nov 01 15:32:49 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 01 Nov 2006 - 05:30:36 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.