[datatable-help] datatable roll="next" takes 150 times longer than findInterval

Gabor Grothendieck ggrothendieck at gmail.com
Thu Feb 6 15:20:37 CET 2014


On Thu, Feb 6, 2014 at 8:53 AM, Arunkumar Srinivasan
<aragorn168b at gmail.com> wrote:
> Not really. Because it still doing a "by". Meaning, for every grouping in
> "by"  - abs(x-y) will be evaluated. If there are 1e5 groups, there'll be 1e5
> calls. And that can be expensive depending on the function + the time to
> call eval from within C.
>
> However, since it's not necessary to do a by-without-by, we can perform the
> join and then compute once the difference between columns. There's no
> grouping, no eval from C, and no multiple calls to abs. Hope this clears it
> up?
>
>

In that case what is the proposed user interface?

I thought that the idea was that one would have to explicitly specify
the by= clause for by-within-by  it to occur.  In the code I had just
posted there is a join = "nearest" but no by= clause is specified.


More information about the datatable-help mailing list