mailRe: [task #7807] Speed-up of dispersion models for Clustered analysis


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on June 15, 2014 - 15:01:
Hi,

Does the test script work
(https://gna.org/support/download.php?file_id=21021)?  You should see
the same matrix printed 3 times.

Regards,

Edward

On 15 June 2014 14:57, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.

I have tried the "out" argument, but it wont work ???

dot(A, B, out=C)
dot(C, A, out=C)
The C would evaluate to zero, if I use it both in function, and in the out.

I dont know why!



2014-06-15 10:30 GMT+02:00 Edward d Auvergne
<NO-REPLY.INVALID-ADDRESS@xxxxxxx>:

Follow-up Comment #199, task #7807 (project relax):

The following python script, to be placed in the base relax directory, and
the
corresponding log file, demonstrate the speed differences of various dot
product operations.  This is to help make the numeric dispersion models
faster.

The script tests 3 different operations:

1) Sequential dot products (a = dot(b, c); a = dot(a, d)).
2) Chained dot products (a = b.dot(c).dot(d)).
3) Using the out argument to avoid memory allocation and garbage
collection
(dot(b, c, a); dot(a, d, a)).

The timings are:

1) 3.71 s.
2) 4.05 s.
3) 1.99 s.

As option 1) is the implementation used in the relax trunk, clearly option
3
has the potential to significantly speed up the models.


(file #21021, file #21022)
    _______________________________________________________

Additional Item Attachment:

File name: dot_speed.py                   Size:2 KB
File name: dot_speed.log                  Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/task/?7807>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/





Related Messages


Powered by MHonArc, Updated Sun Jun 15 15:20:13 2014