april icon indicating copy to clipboard operation
april copied to clipboard

possible optimization: compute (once) and bind expressions with no variables

Open justin2004 opened this issue 3 years ago • 0 comments

APRIL> (time (april "{+/,(3 3 ⍴ ¯1 ¯1 ¯1 ¯1 9) × ⍵}⌺ 3 3 ⊢ 300 300 ⍴ 100 ⋄ 0"))
Evaluation took:
  11.227 seconds of real time
  79.567628 seconds of total run time (77.091352 user, 2.476276 system)
  [ Run times consist of 0.148 seconds GC time, and 79.420 seconds non-GC time. ]
  708.72% CPU
  25,774,598,951 processor cycles
  623,278,688 bytes consed

0
APRIL> (time (april "kern←3 3 ⍴ ¯1 ¯1 ¯1 ¯1 9
       {+/,kern × ⍵}⌺ 3 3 ⊢ 300 300 ⍴ 100 ⋄ 0"))
Evaluation took:
  6.386 seconds of real time
  45.859885 seconds of total run time (44.618362 user, 1.241523 system)
  [ Run times consist of 0.041 seconds GC time, and 45.819 seconds non-GC time. ]
  718.13% CPU
  14,661,466,564 processor cycles
  483,270,640 bytes consed

0

justin2004 avatar Feb 21 '22 18:02 justin2004