If these values for size and density are typical, then it appears that
Ric's
suggestion, and mine, come out a bit better.
Presumably if you're using a sparse representation, you may assume you've
already got an index array.
$bigmap
3000 4000
+/,bigmap NB. ~ 0.004% density
500
bigix =: 4$.$. bigmap NB. or big ix =: ix bigmap NB. preset the
index array
ts'({&bigm@:{."1,. {&bign@:{:"1)bigix' NB. MD -slower but thinner
0.0001388 5888
ts'|:(bigm,:bign) {~"1 |: bigix' NB. Ric - 10x quicker but 5x fatter
1.06e_5 25504
... so perhaps Ric was right all along!
I haven't tried Bill's 200000 x 20000 though.
Cheers,
Mike
On 23/09/2021 16:22, bill lam wrote:
I encountered a case in which
$map = 200000 20000
Density of map is 0.004%
map is already sparse otherwise it will run into out-of-memory error
readily.
On Thu, Sep 23, 2021, 11:07 PM 'Michael Day' via Programming <
[email protected]> wrote:
Henry's comment just now explains the difference in performance, I
should think.
Bill hasn't yet told us the ones-density or matrix-size.
Anyway,
Engine: j903/j64avx2/windows
Beta-q: commercial/2021-09-14T15:38:42
Library: 9.03.06
Qt IDE: 1.9.3/5.15.2(5.15.2)
Platform: Win 64
Installer: J903 install
InstallPath: c:/d/j903-beta
Contact: www.jsoftware.com
Cheers,
Mike
On 23/09/2021 15:53, Raul Miller wrote:
Possibly special code. Which version of J were you using?
(I haven't benchmarked any of this myself. I probably should...)
Thanks,
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm