Summary: Very good dotProduct
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-06-25 15:17:41 PDT ---
This is really an enhancement request.

In many programs I compute dot product among two arrays of doubles (often
inside another loop. So it's positive std.numeric.dotProduct uses assert
instead of enforce). This is sometimes the most time-critical operation of a
whole small numerical program.

So I'd like the dot product among two arrays of doubles to be specialized with
an asm routine (that uses SSE registers). In my opinion this algorithm is
simple enough and this product is critical enough to justify this asm code
added to Phobos (a disadvantage is that D front-end doesn't inline functions
that contain asm) (as array operations in druntime are often in asm).

Two more specialized routines can be added somewhere (if necessary elsewhere,
where a small vector struct is defined in Phobos) to perform dotProduct among
fixed-sized arrays of 3 or 4 doubles. This often another performance-critical

See for example:

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to