Thursday, May 30, 2013

Parallel xasc

Sorting a table can be divided into two parts: determining the new order for the rows, and applying that ordering to the columns. While the former can’t be parallelized in q, the latter can. I don’t have any hard numbers handy at the moment, but with large tables and under the right conditions, I’ve seen noticeable speedups.

Note, BTW, that you can’t (and shouldn’t) write to disk from inside a peach, so this is only applicable to an ordinary in-memory table sort, not the on-disk variety (`c xasc`:t).

q)pxasc :{(count keys y)!flip{y x}[ iasc(raze x)#0!y]peach flip 0!y}
q)pxdesc:{(count keys y)!flip{y x}[idesc(raze x)#0!y]peach flip 0!y}



At August 25, 2015 at 12:05 AM , Blogger Arif Hossain said...

This comment has been removed by the author.

At April 28, 2020 at 8:11 PM , Blogger csyan said...

Le magasin a résolu des problèmes pour moi,pas cher air max le service est très patient, c'est une expérience de magasinage parfaite. Quand j'ai reçu les chaussures,pas cher nike air max 1 homme je pensais que c'était une bonne copie des chaussures. J'aime cette boutique en ligne, les chaussures sont simples et élégantes. Très satisfait de cet achat.

At September 9, 2020 at 12:26 AM , Blogger csyan said...

I have always liked sunglasses.replica sunglasses uk I just happened to buy it in this store. I chose this classic, I am very beautiful. Later, I found that the price of the event was 50% cheaper than usual or other stores.replica versace sunglassesVery valuable


Post a Comment

Subscribe to Post Comments [Atom]

<< Home