a. You did not indicate what the J time-space numbers were on the expressions.
b. +/i.n is not a good test as 2!n would give an instantaneous answer. Please do the benchmarks on random numbers. ----- Original Message ----- From: Arie Groeneveld <[EMAIL PROTECTED]> Date: Monday, August 13, 2007 11:27 Subject: Re: [Jprogramming] Power sets To: Programming forum <[email protected]> > Roger Hui wrote: > >> Can't help it, but here's an illustration in speed difference > >> between Haskell GHCi (interpreted) and J on this subject. > > > > How does Haskell GHCi perform on things like summation, > > maximum, sort, and indexing? e.g. For each of the > following > > arguments, > > > > i4=: 1e6 [EMAIL PROTECTED] 2e4 > > i9=: 1e6 [EMAIL PROTECTED] 2e9 > > d =: 1e6 [EMAIL PROTECTED] 0 > > > > ts '+/ i4' > > ts '>./ i4' > > ts '/:~ i4' > > ts 'i.~ i4' > > ts '+/i6' > > etc. > First of all it's not my intention to promote Haskell by you > J-ers! I'm as much interested in Haskell as in J. The speed > difference is just an aspect in this matter that caught my attention! > > But you asked for it, so here are some comparison's > in advantage to J to reassure you (if necessary) : > > *Main> sum [1..1000000] > 500000500000 > (3.04 secs, 165391456 bytes) > > Here's what they call in Haskell a strict version of summing: > *Main> foldl' (+) 0 [1..1000000] > 500000500000 > (0.36 secs, 112405920 bytes) > Still a lot slower! > > Other actions are alike: much slower in interpreted Haskell. > Hoping I didn't offend you too much caused by my naive way > of putting things ;-) > And no, you don't have to convince of the beauty and power of J. > And finally if you people don't want this kind of fuzz > on your forum please don't hesitate tell me! ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
