|
From: | Dr . Jürgen Sauermann |
Subject: | Re: Another slow each (∨/¨) |
Date: | Sun, 1 Nov 2020 19:59:21 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi,
the ∨/¨ on nested logical vectors is running slow.
)WSID
IS CLEAR WS
⍝ get the data for testing
⍴f ← ⎕FIO[49] '/OTH/APL/trunk/src/Makefile.in'
5246
⍝ timer
t←⎕FIO[50] 1
⍝ Finding SQL-records is fast. The ∨/¨ is the slow guy - about 2 min.
⍝ I would expect that " (⊂'SQL') ⍷¨ f " takes more cycles to run than " ∨/¨ "
R←(∨/¨(⊂'SQL') ⍷¨ f)/f
⍝ timer
(⎕FIO[50] 1) -t
127
⍝ alternatively:
⍴m←⊃f
5246 487
t←⎕FIO[50] 1
R←(∨/'SQL' ⍷ m)/f
(⎕FIO[50] 1) -t
1
(Fedora 32, Mem 16GB, i7-2860QM CPU @ 2.50GHz )
Best Regards
Hans-Peter
[Prev in Thread] | Current Thread | [Next in Thread] |