On Thu, Nov 5, 2015 at 10:37 AM, Raul Miller <[email protected]> wrote:
> One thing of note, here, is that the K "each" is a single character
> (and does less work under the covers, so is faster than J's each).
> It's also K's analog to J's "rank" (though - again, it does less and
> so is faster).
>
> So that's a factor of up to 4 in code size, when it's needed, and when
> it fits (which is frequently).

Not to nitpick here, but I don't think we can draw any conclusions on
the number of characters or even the number of operations (since each
composed of a conjunction and verb)

I can cut down on the code size factor if I wanted to:

E=:&.>
1 + E (1;2;3)

I don't think that's the right metric though.

I'm also not so sure we can say with certainty that K's each is faster
than J's without some testing. It's probably true that is doing more
work but the extra work may be inconsequential.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to