diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-07 08:12:23 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2021-08-07 08:12:31 -0400 |
| commit | 532796eb397c8374e0546de9e4ab70c2955349f3 (patch) | |
| tree | fe6d89d6545bae95961c58c31bd6f27f5be8198c /implementation | |
| parent | d9c8e65f8bf6219c169eddbfb9320a045f70d636 (diff) | |
Grammar
Diffstat (limited to 'implementation')
| -rw-r--r-- | implementation/kclaims.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/implementation/kclaims.md b/implementation/kclaims.md index 4c95d1c1..20d40646 100644 --- a/implementation/kclaims.md +++ b/implementation/kclaims.md @@ -20,7 +20,7 @@ The primary reason I don't give any credence to claims that K is the best is tha A related theme I find is equivocating between different kinds of performance. I suspect that for interpreting scalar code K is faster than APL and J but slower than Javascript, and certainly any compiled language. For operations on arrays, maybe it beats Javascript and Java but loses to current Dyalog and tensor frameworks. Simple database queries, Shakti says it's faster than Spark and Postgres but is silent about newer in-memory databases. The most extreme K advocates sweep away all this complexity by comparing K to weaker contenders in each category. Just about any language can be "the best" with this approach. -Before getting into array-based versus scalar code, but here's a simpler case. It's well known that K works on one list at a time, that is, if you have a matrix—in K, a list of lists—then applying an operation (say sum) to each row works on each one independently. If the rows are short then there's function overhead for each one. In APL, J, and BQN, the matrix is stored as one unit with a stride. The sum can use one metadata computation for all rows, and there's usually special code for many row-wise functions. I measured that Dyalog is 30 times faster than ngn/k to sum rows of a ten-million by three float (double) matrix, for one fairly representative example. It's fine to say—as many K-ers do—that these cases don't matter or can be avoided in practice; it's dishonest (or ignorant) to claim they don't exist. +Before getting into array-based versus scalar code, here's a simpler case. It's well known that K works on one list at a time, that is, if you have a matrix—in K, a list of lists—then applying an operation (say sum) to each row works on each one independently. If the rows are short then there's function overhead for each one. In APL, J, and BQN, the matrix is stored as one unit with a stride. The sum can use one metadata computation for all rows, and there's usually special code for many row-wise functions. I measured that Dyalog is 30 times faster than ngn/k to sum rows of a ten-million by three float (double) matrix, for one fairly representative example. It's fine to say—as many K-ers do—that these cases don't matter or can be avoided in practice; it's dishonest (or ignorant) to claim they don't exist. ## Scalar versus array code |
