There's a very elegant Haskell quicksort implementation that misses out on performance because it's not in-place. It's frequently used as a demonstration. The performant version looks as bad as C.
I'd be more interested in a J/K demonstration that plays to the language's strengths. How about live-commentating e-sports?
* Player gets first blood. Commentator executes search query in J across DB. *
"We've seen $PLAYER_NAME contribute to 65% of first blood situations across their last 10 matches."
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).
I'd be more interested in a J/K demonstration that plays to the language's strengths. How about live-commentating e-sports?
* Player gets first blood. Commentator executes search query in J across DB. *
"We've seen $PLAYER_NAME contribute to 65% of first blood situations across their last 10 matches."