Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-04 Thread Simon Urbanek
On Sep 4, 2012, at 8:07 AM, "Matthew Dowle" wrote: > >> Actually, my apologies, I was assuming that your example was based on the >> SO question while it is not at all (the code is not involved in that test >> case). Reversing the order does indeed cause a delay. Switching to a >> single index d

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-04 Thread Matthew Dowle
> Actually, my apologies, I was assuming that your example was based on the > SO question while it is not at all (the code is not involved in that test > case). Reversing the order does indeed cause a delay. Switching to a > single index doesn't seem to have any impact. R-devel has the faster > ve

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
Actually, my apologies, I was assuming that your example was based on the SO question while it is not at all (the code is not involved in that test case). Reversing the order does indeed cause a delay. Switching to a single index doesn't seem to have any impact. R-devel has the faster version no

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
On Sep 2, 2012, at 10:04 PM, Matthew Dowle wrote: > > In do_matrix in src/array.c there is a type switch containing : > > case LGLSXP : >for (i = 0; i < nr; i++) >for (j = 0; j < nc; j++) >LOGICAL(ans)[i + j * NR] = NA_LOGICAL; > > That seems page inefficient, iiuc. Think it sho

[Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Matthew Dowle
In do_matrix in src/array.c there is a type switch containing : case LGLSXP : for (i = 0; i < nr; i++) for (j = 0; j < nc; j++) LOGICAL(ans)[i + j * NR] = NA_LOGICAL; That seems page inefficient, iiuc. Think it should be : case LGLSXP : for (j = 0; j < nc; j++) for (i =