Skip to content

#742 performace loss between 1.2.2 and 2.0

Metadata

Property Value
Reported by Andreas Dedner (A.S.Dedner@warwick.ac.uk)
Reported at Feb 17, 2010 18:00
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Last edited at Mar 12, 2010 06:42
Closed by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Closed at Mar 12, 2010 06:42
Closed in version 2.0
Resolution Fixed
Comment

Description

There is a significant performance loss between the release 1.2.2 and 2.0. This can for example be seen using the finitevolume test in the dune-grid-howto. There are at least 2 issues we found:

  1. in common/fvector.hh: the use of memcpy in the copy constructor and assignment operator leads to about 20% loss. It is probably only a good idea for large vectors - but FieldVectors are quite often small. This was introduced in rev. 5874.
  2. The second issue are changes in Yasp from rev. 6005. A patch reverting some of these changes is attached. With the patch applied we gain about 50%. They concern the reasonable separation of the Intersection from the IntersectionIterator but perhaps the use of the shared_ptr cost too much performance.

Summary (using YaspGrid<2>) dune-common, dune-grid: releases/1.2.2 dune-grid-hwoto: releases/1.2 a: 2m52.759s 2m52.432s 2m52.169s | 170s

dune-common, dune-grid: trunk dune-grid-howto: trunk and releases/1.2: b: howto trunk: 6m17.540s 6m03.663s 6m09.943s | 370s c: howto 1.2: 6m07.869s 6m12.032s 6m11.272s | 370s d: howto trunk no mc:5m04.990s 5m15.163s 5m07.877s | 310s e: howto 1.2 no mc: 5m35.168s 5m41.208s 5m40.581s | 340s f: howto trunk no mc and yasp patch: 2m22.751s 2m23.167s 2m20.617s | 140s

  1. memcopy (mc) leads to +9% (c/e) or +19% (b/d)
  2. other changes between 1.2.2 and 2.0 lead to +80% (d/a) or +100% (e/a) This difference seems to be caused by the seperation of Intersection/IntersectionIterator in YaspGrid (shared_ptr?) Applied patch is a partial revert of -r6005.
  3. f/a<1 and d/e<1 is probably due to the new interface methods (center...)
  4. why b=c is somewhat unclear (would expect b/c<1)

Attachments