I stumbled across better performance (kdb+ vs. Jd) in my own stuff: 
http://blog.vmchale.com/article/q-perf <http://blog.vmchale.com/article/q-perf>

Basically joins take longer (which I think makes sense?). It’s easy to imagine 
that selections and joins (on the ordered keys) are going to be faster since 
one can implement them differently.

FWIW, my *assumption* is that q’s use of ordered keys is what makes it faster, 
not 100% sure. 

Cheers,
Vanessa McHale

> On Feb 1, 2022, at 4:31 PM, Elijah Stone <elro...@elronnd.net> wrote:
> 
> 1. What is the efficiency gain from ordered keys?
> 
> (In general, the more restrictive your semantics are, the more freedom you 
> have about implementing them, and hence the more efficient you can be. So 
> this doesn't make sense to me.
> 
> Ordering keys may happen to be faster as an _implementation_ strategy in some 
> situations and given some access patterns, and in that case the 
> implementation should certainly use such a representation.  But I do not 
> think forcing semantics is a good performance argument.)
> 
> 2. It is possible to materialize arbitrary orderings on-demand by
>   indexing with an appropriately ordered array of keys.  I do not think
>   this is a good argument for making the data inherently ordered.
> 
> -E
> 
> On Tue, 1 Feb 2022, Raul Miller wrote:
> 
>> On Mon, Jan 31, 2022 at 9:16 PM Elijah Stone <elro...@elronnd.net> wrote:
>>> I think not; keys should not be ordered.
>> 
>> I think I need to disagree here.
>> 
>> (1) K (and Q) have shown that you get great efficiencies with ordered keys.
>> 
>> (2) Also, arrays require ordered data for meaningful operations.
>> 
>> (3) Lack of order tends to introduce needlessly arbitrary distinctions.
>> 
>> Now... we might want to support multiple concepts of order, but that's
>> relatively straightforward.
>> 
>> Thanks,
>> 
>> -- 
>> Raul
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to