From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:7fc3:: with SMTP id a186mr14656094qkd.251.1585064698715; Tue, 24 Mar 2020 08:44:58 -0700 (PDT) X-Received: by 2002:a05:6830:184:: with SMTP id q4mr3063474ota.114.1585064698419; Tue, 24 Mar 2020 08:44:58 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 24 Mar 2020 08:44:58 -0700 (PDT) In-Reply-To: <6c2c0e35-af07-4169-8be5-464ec7fd0fd5@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=84.93.38.45; posting-account=Jzt5lQoAAAB4PhTgRLOPGuTLd_K1LY-C NNTP-Posting-Host: 84.93.38.45 References: <6c2c0e35-af07-4169-8be5-464ec7fd0fd5@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0f03ee83-82c5-476c-a154-11c760997ad9@googlegroups.com> Subject: Re: GNAT vs Matlab - operation on multidimensional complex matrices From: johnscpg@googlemail.com Injection-Date: Tue, 24 Mar 2020 15:44:58 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58240 Date: 2020-03-24T08:44:58-07:00 List-Id: Hi Darek, Your latest runtimes agree with mine. I ran on a 1 GHz cpu. Your Ryzen 3750H is iiuc 2.3 GHz. If I divide my runtimes by 2.3 I get pretty much the same as yours. The remaining mystery is matlab's sum of the Real array, which matlab runs in 1/3 the time of the Complex array, even though it does 1/2 as many operations. I wonder if matlab is running the program on multiple cores. Here's what www.mathworks.com says: https://www.mathworks.com/matlabcentral/answers/350324-is-multi-threading-possible-in-matlab "Many commands, e.g. sum is multi-threaded internally already: beyond a specific data size, the work is distributed to multiple threads, which are processed in parallel."