4 ms·
Idiomatic K solutions (and from what I hear, J as well) tend to be faster than idiomatic C solutions to the same problems. It originally seemed like magic to m
by beagle3 6y ago
Idiomatic K solutions (and from what I hear, J as well) tend to be faster than idiomatic C solutions to the same problems.
It originally seemed like magic to me, but really - there is no magic. It is simpler in K and J to process more things, in more stages, but with completely predictable and very pipelineable operations. The J/K program often does 2 or 4 times as many operations, but has virtually everything prefetched to L1 before it’s needed so it runs as fast or even faster.
CPUs are constantly converging towards the K model (GPUs were always there).
- smabie 6y agoIf there was a time for array languages, it would be now. I would argue that most programming nowadays is about manipulating arrays of data.