Skip to content

doesn't say how to contribute #471

Open
@lulcat

Description

@lulcat

Your results are very iffy vs. local runs here. By that I don't mean the run times as I am using 24T on a different CPU (Ryzen 7th gen);
but intra results on these so called program test results.

Anyway, spectral-norm, 1.d , for multi threading, a simple edit on a line should make it MT 1-m.d:
(fs, don't even know how to make quoted code here :p)

--- 1.d.orig	2025-03-24 09:45:54.198352668 +0100
+++ 1.d	2025-03-24 09:47:15.757138282 +0100
@@ -34,7 +34,7 @@
 
 void times(double[] v, double[] u, int n, bool reverse)
 {
-    for (auto i = 0; i < n; i++)
+    foreach(i;parallel(iota(n)))
     {
         auto sum = 0.0;
         for (auto j = 0; j < n; j++)

times here for 8000:

c++ im = 158-160ms
c m = 160-162ms
d m = 236ms (+50%)

I know from experience this can be brought down into about 200ms most likely, but then again, changing just one line says somehting about production time vs. runtime :) over far more complex changes in said other languages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions