Anders Logg wrote: > On Wed, Oct 07, 2009 at 10:25:49AM +0100, Garth N. Wells wrote: >> How costly is this call in Function::restrict >> >> _function_space->has_element(element, dolfin_cell) > > Very cheap (I think). >
I expect that this one isn't: boost::scoped_array<uint> dofs(new uint[dofmap.local_dimension(ufc_cell)]); Garth >> ? It is called for every coefficient on every cell during assembly. > > This is why I worked on the hash thing yesterday. It does two > comparisons, first comparing two uint then to pointers. The hash is > now an uint so it should be fast. > > We could also make this function inline. > > -- > Anders > > > ------------------------------------------------------------------------ > > _______________________________________________ > DOLFIN-dev mailing list > DOLFIN-dev@fenics.org > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list DOLFIN-dev@fenics.org http://www.fenics.org/mailman/listinfo/dolfin-dev