One of the things that makes K faster is that a lot of responsibility is laid on the user/programmer. For example, from a K session:

  2147483648 + 1234
-2147482415
  2147483648 + 2147483648
-2
  2147483648 + 2147483648 + 4
2

removing the check for overflow and not doing automatic promotion saves quite a lot of overhead time for such math. This is much less of a practical issue in a 64 bit machine... There are other examples of K being very minimalist which, of course, contributes to its small size. People who argue for strong typing would be upset, and those of us spoiled to automatic promotion to appropriate type might be upset as well.


At 09:44  -0800 2008/04/08, [EMAIL PROTECTED] wrote:
What makes K faster than J.

I read on wikipedia.com that:

The small size of the K interpreter and compact syntax of
the K language makes it possible for K applications to fit
entirely within the level 1 cache of the processor. Vector
processing makes efficient use of the cache row fetching
mechanism and posted writes without introducing bubbles into
the pipeline by creating a dependency between consecutive
instructions.

Is this the reason K is so fast?  Would it be possible to
modify J to approach the speed of K?

Please don't flame me, just curious.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to