> Note that getBaseClassIndex() is 10 times slower that getClassIndex(), I > wonder why... > getBaseClassIndex creates an instance of the base class at every call, getClassIndex just returns a number. Not good. Janek, what it the boost::serialization solution of that?
from Indexable.hpp public: virtual int& getBaseClassIndex(int depth) \ { \ static boost::scoped_ptr<BaseClass> baseClass(new BaseClass); \ if(depth == 1) \ return baseClass->getClassIndex(); \ else \ return baseClass->getBaseClassIndex(--depth); \ } _______________________________________________ yade-dev mailing list yade-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/yade-dev