On Wed, October 2, 2013 8:03 pm, Gautam Goel wrote:
> Hi all,
>
> I'm a J newbie, and I'm curious about its performance. I've seen
> statements
> that J has "very high performance", but I haven't seen actual benchmarks
> to
> back that up. How does J compare to languages like C (which are known to
> be
> very fast) or Python (which, being interpreted, are usually much slower)?

Benchmarks over the decades have consistently shown that APL and J
perform much worse than compiled languages (including COBOL, FORTRAN,
and C at various times) on scalar code, and much better on vector and
higher-dimensional array code above some size that depends on the
particular implementations being compared. The most extreme case I
know of was reported by Morgan-Stanley at APL 89 in New York. They
were running their own APL dialect, written by Arthur Whitney, on the
largest Sun workstations made, allowing for arrays of hundreds of
megabytes.

In cases where APL was mainly calling FORTRAN libraries, it performed
at close to FORTRAN speed on the same hardware. I expect that the same
is true of C libraries, but I have not seen the numbers.

Roy Sykes ran a very successful APL consultancy that specialized in
optimizing APL code. He could get quite substantial speedups over
naive code, but I do not recall him publishing any numbers.

As an aside, I won a joke programming contest run by Stan Kelly-Bootle
by citing the Morgan-Stanley implementation. The challenge was to
create the largest ratio of error text to code size. I won with the
APL equivalent of

execute x gets 'execute x'

which fills memory with stack frames until it reaches WS FULL, and
then reports the state of the entire stack. It can be used to test the
WS FULL implementation and stack handling of APL implementations. I
reckoned that the Morgan-Stanley version should have been able to get
to at least a million stack frames on a 2G Sun workstation at the
time. The maximum would be absurdly more on a 64-bit architecture. As
a result of this and other interactions with Stan I have my own entry
in his Computer Contradictionary, the successor to The Devil's DP
Dictionary.

> --
> Cheers,
>
> Gautam C. Goel

-- 
Edward Mokurai (默雷/निशब्दगर्ज/نشبدگرج) Cherlin
Silent Thunder is my name, and Children are my nation.
The Cosmos is my dwelling place, the Truth my destination.
http://wiki.sugarlabs.org/go/Replacing_Textbooks
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to