← Back to team overview

dolfin team mailing list archive

Re: Benchmark for GenericMatrix with and wihtout template

 

On Mon, 2006-05-08 at 13:24 +0200, Anders Logg wrote:
> I have added a benchmark to src/test/main.cpp. It compares the speed
> of assemblhy for 2D Poisson on a 128 x 128 mesh repeated 100
> times. Here are some typical timings:
> 
> Time with template:    4.23
> Time without template: 4.24
> 
> Time with template:    4.24
> Time without template: 4.21
> 
> Time with template:    4.2
> Time without template: 4.29
> 
> Time with template:    4.22
> Time without template: 4.24
> 
> Time with template:    4.22
> Time without template: 4.15
> 
> Sometimes the templated version wins and sometimes the non-templated
> wins, so I'd say there is no overhead of removing the templating. The
> advantage would be that FEM and other implementations can be
> simplified and more code moved to .cpp from .h.
> 
> Garth, maybe you can check the benchmark and see if you agree with the
> results. I've compiled with --enable-optimization.
> 

Looks good to me. I'm happy if the matrix templates are removed.

Garth


> /Anders
> 
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev




Follow ups

References