2022.03.17 11:24 PM
At least twice in tick.q
key flip value t is used to get the columns names of the table t.
Would cols t not do the same job?
If so, surely key flip value t has a greater memory overhead.
2022.03.18 12:02 AM - edited 2022.03.18 12:04 AM
Perhaps the author was trading memory for speed?
q)t:flip(`$'.Q.a)!26 10000000#26000000?1000
q)(cols `t)~key flip value `t
1b
q)\ts:10000 cols `t
12 528
q)\ts:10000 key flip value `t
2 880
One of the loveliest aspects of working in q is how easy it is to experiment like this!
2022.03.18 12:02 AM - edited 2022.03.18 12:04 AM
Perhaps the author was trading memory for speed?
q)t:flip(`$'.Q.a)!26 10000000#26000000?1000
q)(cols `t)~key flip value `t
1b
q)\ts:10000 cols `t
12 528
q)\ts:10000 key flip value `t
2 880
One of the loveliest aspects of working in q is how easy it is to experiment like this!
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.