Two things can be done to put the "15 seconds on
a 1 GHz PC" benchmark in perspective. The first
is to compare it to some standard benchmark,
say the time it takes to do +/ on a million-
element floating point vector; the second is to do
,/ on (n,2 3){rho}'a' for n=2e5 4e5 6e5 8e5 1e6.
In J (on a 500 Mhz PC):
timer=: 6!:2
timer '+/x' [ x=: 0.01 * ?1e6$100
0.0182708
tcr=: 3 : 'timer '',/x'' [ x=. (y.,2 3)$''a'''
tcr"0 ] 2e5 * 1 2 3 4 5
0.00979398 0.0192589 0.0351765 0.0453169 0.0629398
0.0629398 % 0.0182708
3.44483
i.e. in J the time for ,/x is linear in the leading
dimension of x, and the time for ,/(1e6 2 3)$'a'
is roughly 3.5 times the time for +/1e6$1.01.
Can you please do the additional benchmarks in
Dyalog APL?
Quote:
----- Original Message -----
Sent: Tuesday, December 24, 2002 20:33 PM
Subject: Re: Finding permutations
> On Tue, 24 Dec 2002 20:50:31 -0500, Ray Cannon wrote
> >> The use of catenatefirst reduction in the following
> >> makes me curious. Can you please tell me the time for
> >> the following reduction in Dyalog APL?
> >> x {is} 1e6 2 3 {rho} 'a'
> >> {catenatefirst} {reduction} x
> > 15 sec on a 1GHz PC
> > x {<-} 1e6 2 3 {rho} 'a'
> > #ts & a{<-} {commabar}/x & #ts
> > 2002 12 25 1 47 15 0
> > 2002 12 25 1 47 30 0
> I run Dyalog APL under Windows 2000 which in turn is running under Virtual
PC
> on a Macintosh. Virtual PC emulates a Pentium processor on a Power PC
> processor. Although this privides me with a totally satisfactory
development
> environment, the performance is quite a bit slower than it would be if I
were
> running natively on a real PC. My Macintosh has a processor speed of 500
MHZ,
> and the benchmarks I have performed suggest that all-in-all through
Virtual
> PC I am getting the equivilent of something between a 150 to 200 MHZ PC.
> The above expression took 72 seconds, a time which is reasonably
consistent
> with that which Ray reported.
> --
> James L. Ryan
> TaliesinSoft