← Back to team overview

yade-dev team mailing list archive

Re: ConstitutiveLawDispatcher (speed)

 

I was just running small benchmark (tension-compression test) on
ConstitutiveLawDispatcher and it is consistently (2x repeated with
almost same results) _faster_ than constitutive law as StandAloneEngine.

#0 is regular case, SnadAloneEngine doing all the computations in its
loop. #1 is StandAloneEngine, but calling the functor in each loop,
instead of computing by itself; #2 is ConstitutiveLawDispatcher (and
using the functor, of course).  And the times are 16:07, 13:02 and
12:00. Surprising! Perhaps the compiler can optimize better if the code
is in separate function?

Best regards, Vaclav.

---
falx:~/yade/mm10/functor-test > yade-trunk-opt-multi --log=2_@.log
functor-dispatch.table rb.py
Will run `/usr/local/bin/yade-trunk-opt' on `rb.py' with nice value 10,
output redirected to `2_@.log', 2 jobs at a time.
Will use table `functor-dispatch.table', with available lines 2, 3, 4.
Will use lines  2, 3, 4.
{2: 'noFunctor', 3: 'useFunctor', 4: 'dispatcher'}
Job summary:
   #0 (noFunctor): PARAM_TABLE=functor-dispatch.table:2 nice -n 10
/usr/local/bin/yade-trunk-opt -N PythonUI -- -n -x rb.py >
2_noFunctor.log 2>&1
   #1 (useFunctor): PARAM_TABLE=functor-dispatch.table:3 nice -n 10
/usr/local/bin/yade-trunk-opt -N PythonUI -- -n -x rb.py >
2_useFunctor.log 2>&1
   #2 (dispatcher): PARAM_TABLE=functor-dispatch.table:4 nice -n 10
/usr/local/bin/yade-trunk-opt -N PythonUI -- -n -x rb.py >
2_dispatcher.log 2>&1
#0 started on Wed Feb 11 08:25:20 2009
#1 started on Wed Feb 11 08:25:20 2009
#1 done    (exit status 0), duration 00:13:02, log 2_useFunctor.log
#2 started on Wed Feb 11 08:38:23 2009
#0 done    (exit status 0), duration 00:16:07, log 2_noFunctor.log
#2 done    (exit status 0), duration 00:12:00, log 2_dispatcher.log

(http://yade.wikia.com/wiki/ScriptParametricStudy)



Follow ups

References