4 ms·
They're 8-byte ints, and the reported times are sum of 100 runs. This is what my 2019 i5 1.6ghz Macbook Air does: q)`sA`sB`pA`pB set'4 0N#1000000?100 `
by geocar 5y ago
They're 8-byte ints, and the reported times are sum of 100 runs. This is what my 2019 i5 1.6ghz Macbook Air does:
q)`sA`sB`pA`pB set'4 0N#1000000?100
`sA`sB`pA`pB
q)\t:100 (sA*pA>=pB)+sB*pA<=pB
60
- mlochbaum 5y agoWhere do you get this information? Do you have some connection to the article? It appears this benchmark uses vectors of a quarter-million, not a million, elements? My understanding is that 4 0N#a redistributes elements of a into four vectors without repeating them, and this is what ngn/k does. The article says a "sample table of size one million", refers to "one million rows" elsewhere, and later gives timings that scale linearly with the number of columns, so I don't think that's what is meant. EDIT: Oh, there's generation code near the top. In an image for some reason so the Q version is transcribed below. Definitely a million rows. Seems both Numpy's random.randint and Q default to 8-byte ints? Dyalog would use 1-byte integers if the data fits, as it does in this example. N: 1000 * 1000 t: ([] pA: N?5; pB: N?5 sA: N?100; sB: N?100)