Re: [Rd] From .Fortran to .Call?

2020-12-27 Thread Koenker, Roger W
Indeed, using profmem there is a significant advantage in memory:

>  sum(mb$bytes)
[1] 261834640   #using .Fortran
> sum(ma$bytes)
[1] 149221000  #using .C64

> On Dec 26, 2020, at 10:22 PM, Kasper Daniel Hansen 
>  wrote:
> 
> Did you check memory usage? I don't know anything about Fortran, but using 
> .Call for C code doesn't duplicate the memory of the objects you supply to 
> the interface, and in some instances, that's an advantage. But that assumes 
> you're doing something like
>   .Call("foo", xx)
> and not
>   Call("foo", as.matrix(xx))
> 
> 
> 
> On Sat, Dec 26, 2020 at 5:48 PM Koenker, Roger W  
> wrote:
> I’ve recoded a version of one of my quantile regression fitting functions to 
> use .C64 from dotCall64 rather than .Fortran.
> For a moderately large problem with n = 500,000 and p = 5, and solving for  
> 1:49/50 quantiles the new version shows
> a 3% speedup, although for smaller problems it is actually slower that the 
> .Fortran version.  So, I’m (provisionally) 
> unimpressed by the claims that .Fortran has a big “overhead” performance 
> penalty.  Compared to the(more than) an order of
> magnitude (base 10) improvement that moving from R to fortran produces,  3% 
> isn’t really worth the (admittedly) minimal
> additional coding effort.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] installing from source

2020-12-27 Thread Ben Bolker
  There is a recurring issue with installing from source into paths 
that contain single quotes/apostrophes. "Why would anyone do that??" is 
certainly a legitimate response to such a problem, but I would also say 
this constitutes a legitimate bug.  Would replacing both single-quotes 
below with \\' solve the problem?
   I'm happy to post this (with a patch if my fix seems appropriate) on 
r-bugzilla.


  cheers
Ben Bolker

line 1672 of src/library/tools/R/install.R :

  cmd <- paste0("tools:::.test_load_package('", pkg_name, "', ", 
quote_path(lib), ")")



https://github.com/wch/r-source/blob/2eade649c80725352256f16509f9ff6919fd079c/src/library/tools/R/install.R#L1672

https://stackoverflow.com/questions/15129888/r-cmd-install-error-unexpected-symbol-in-test-load-package-function

https://stackoverflow.com/questions/65462881/cannot-download-packages-from-github-from-unexpected-symbol

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel