Fwd: APL (and other papers) free at ACM Digital Library

2020-03-30 Thread Peter Teeson
> Forwarded Message > Subject: ACM Digital Library free for three months > Date: Mon, 30 Mar 2020 07:23:28 -0700 (PDT) > From: jay.f...@gmail.com > Newsgroups: comp.lang.apl > > Lots of historical APL papers are available in the ACM Digital Library,

Re: Slowness when using lambda expressions

2020-03-30 Thread Xiao-Yong Jin
Compare with Dyalog, ]runtime +/⍳100 * Benchmarking "+/⍳100" (ms) CPU (avg): 1 Elapsed: 1 ]runtime {⍺+⍵}/⍳100 * Benchmarking "{⍺+⍵}/⍳100" (ms) CPU (avg): 270 Elapsed: 279 > On Mar 30, 2020, at 9:38 AM, Xiao-Yong Jin

Re: Slowness when using lambda expressions

2020-03-30 Thread Xiao-Yong Jin
For comparison, here is J, JVERSION Engine: j901/j64avx2/darwin Release-e: commercial/2020-01-29T12:41:32 Library: 9.01.21 Platform: Darwin 64 Installer: J901 install InstallPath: /applications/j901 Contact: www.jsoftware.com timex'+/i.100' 0.00184 plus=:4 :'x+y' timex'plus/i.1

Re: Slowness when using lambda expressions

2020-03-30 Thread Blake McBride
This brings up an interesting point. Truth is, the functional programming model is extremely slow unless, as it often is, the function call is optimized out. On Mon, Mar 30, 2020 at 6:51 AM Elias Mårtenson wrote: > Thank you for the clarification. I can see that the problem isn't that the > lam

Re: Slowness when using lambda expressions

2020-03-30 Thread Elias Mårtenson
Thank you for the clarification. I can see that the problem isn't that the lambda function is slow. It's the +/ variant that is really fast. :-) Of course, as you say, in real code you'd never write it the way I did. :-) Regards, Elias On Mon, 30 Mar 2020 at 17:53, Dr. Jürgen Sauermann wrote:

Re: Slowness when using lambda expressions

2020-03-30 Thread Dr . Jürgen Sauermann
Hi Elias, in GNU APL (and I suppose also in other APLs) lambda expressions are not macros (or inline functions) but fully-fledged defined functions. That is, {⍺+⍵}/ ⍳100 is NOT equivalent to:  +/ ⍳100 Rather: