I'm getting some strange results when I compare the timing for using
cinfony to access RDKit, compared to writing the equivalent C++
program. Basically, for iteration over a very large SDF file, it's 50%
slower if you use cinfony (which simply calls SDMolSupplier and
'yields' the results).

I'm using an SDF file from ZINC that contains 25000 or so molecules
(the first subset of the drug-like molecules) for testing. I have C++
code like the following:

void ReadFromFile(){
        ROMol* mol;
        SDMolSupplier molfile = SDMolSupplier("3_p0.0.sdf");
        while (!molfile.atEnd()) {
                mol = molfile.next();
                if (mol) delete mol;
        }
}

Greg, when you have time (no pun intended), I'd appreciate if you
could compare the run time of this sort of C++ program versus the
equivalent Python script using SDMolSupplier. I'd just like
independent verification for the sort of figures I'm getting. The
thing is, while some overhead is expected, the web says that SWIG
should be worse than Boost.Python, but the SWIG overhead with
OpenBabel is of the order of 4%, not 50%.

Regards,
   Noel

Reply via email to