mailRe: [task #7793] Speed-up of dispersion models


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

Header


Content

Posted by Edward d'Auvergne on May 29, 2014 - 18:42:
Cheers.  This task can now be closed, the branch has been merged.
Please have a close look at the current trunk as there were many
problematic conflicts during the merge process that I had to resolve
by hand.  There may therefore be errors.

As for a speed test, I would recommend just having a script in the
test_suite/shared_data/dispersion/ directories and use that.  Then put
the timings into a text file in the same directory for a record.  This
does not need to be part of the test suite, and there are many
examples in the test_suite/shared_data/ directories already where
scripts are used for demonstration purposes but are not included in
the test suite due to the amount of time they would require.

Note that for timings you have two options:

- True profiling (https://docs.python.org/2/library/profile.html).
This is the most reliable method.

- The timeit Python module
(https://docs.python.org/2/library/timeit.html).  This is useful for
comparing the speed of different ways of performing a simple operation
in Python.

The time output by the system tests are so variable that they are
close to useless.  The test suite timings are completely unreliable.
These two methods are far better, and are really the only way to
obtain reliable timings.  For example I have recently used timeit:

[edward@localhost ~]$ python -m timeit -n 1000000 'import numpy; c =
numpy.array([[ 1, 2, 3],[-1, 1, 4]]);
numpy.apply_along_axis(numpy.linalg.norm, 1, c)'
1000000 loops, best of 3: 59.9 usec per loop
[edward@localhost ~]$ python -m timeit -n 1000000 'import numpy; c =
numpy.array([[ 1, 2, 3],[-1, 1, 4]]); numpy.linalg.norm(c, axis=1)'
1000000 loops, best of 3: 16.9 usec per loop
[edward@localhost ~]$

Regards,

Edward



On 29 May 2014 14:17, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Ed.

Features
Edge cases of function failure is now properly handled for all analytical
dispersion models.
Speed-up of all analytical dispersion models, by moving from value check, to
array check.

Could we take one of the systemtest, and inklude more spins for a speed
test?

For example one of the hansen data for CR72?
Or is all the data truncated?


Best
Troels




2014-05-29 13:14 GMT+02:00 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:

Hi,

It looks complete to me :)  The target_functions.relax_disp to
lib.dispersion API is now consistent and clean.  And the changes do
not appear to have changed the speed, as it shouldn't.  Great work!
I'll merge it back to trunk now.  When I release relax 3.2.2 with the
speed ups and edge case fixes, would you have suggestions for the
points to add to the 'features' list in the release notes (such as at
http://gna.org/forum/forum.php?forum_id=2448)?  Or for the
"Description" paragraph at the start?

Cheers,

Edward

On 29 May 2014 13:03, Troels E. Linnet <NO-REPLY.INVALID-ADDRESS@xxxxxxx>
wrote:
Follow-up Comment #108, task #7793 (project relax):

This should now be completed.

    _______________________________________________________

Reply to this item at:

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

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






Related Messages


Powered by MHonArc, Updated Fri May 30 10:00:18 2014