Hi,
I have seen what I believe is suboptimal behaviour on the part of RooAbsCachedPdf. I have first seen this with RooFFTConvPdf, but it can be reproduced also with the following trivial example with RooCachedPdf.
RooRealVar x("x","x",0.0, -20.0,20.0);
RooGaussian g1("g1","g1",x,RooConst(0.0),RooConst(1.0));
RooCachedPdf g1c("g1c","g1c",g1,RooArgSet(x));
for (int i=0; i<100; ++i) {
RooAbsData *datatemp = g1c.generateBinned(x,NumEvents(100));
delete datatemp;
}
If i run the above, then for every iteration of the loop I get a message
[#1] INFO:Caching – RooAbsCachedPdf::getCache(g1c) creating new cache 0xc031d10 with pdf g1_CACHE_Obs[x] for nset (x) with code 0 from preexisting content.
Which means I believe that the internal cache is being recopied from the global cache. For multidimensional caches this refilling becomes a significant performance drag…
Thanks,
Josh