As part of chemfp I've started doing benchmarking. I noticed that 2.3's SDF parsing speed is about 1/2 that of 2.2. I don't recall hearing about that. Has anyone else seen a similar slowdown?
In the following, the "23150" is the number of structures read, and the next field on the line is the total time. % env BABEL_LIBDIR=/Users/dalke/envs/openbabel-2.2.3-x86/lib/openbabel/2.2.3 BABEL_DATADIR=/Users/dalke/envs/openbabel-2.2.3-x86/share/openbabel/2.2.3 DYLD_LIBRARY_PATH=/Users/dalke/envs/openbabel-2.2.3-x64/lib PYTHONPATH=/Users/dalke/envs/py27-ob223/lib/python2.7/site-packages/ /Users/dalke/envs/py27-ob223/bin/python2.7 read_time.py 23150 11.9479241371 % env BABEL_LIBDIR=/Users/dalke/envs/openbabel-2.3.0-x64/lib/openbabel/2.3.0 BABEL_DATADIR=/Users/dalke/envs/openbabel-2.3.0-x64/share/openbabel/2.3.0 DYLD_LIBRARY_PATH=/Users/dalke/envs/openbabel-2.3.0-x64/lib PYTHONPATH=/Users/dalke/envs/openbabel-2.3.0-x64/lib/python2.7/site-packages /Users/dalke/envs/py27-ob230/bin/python2.7 read_time.py 23150 28.779763937 The benchmark code is essentially import time filename = "/Users/dalke/databases/pubchem/Compound_000000001_000025000.sdf.gz" import openbabel as ob obconversion = ob.OBConversion() obconversion.SetInFormat("sdf") obmol = ob.OBMol() notatend = obconversion.ReadFile(obmol, filename) n = 0 t1 = time.time() while notatend: n += 1 # reuse the molecule for 0.3 seconds of savings vs. making an new one obmol.Clear() notatend = obconversion.Read(obmol) print n, time.time()-t1 ("Essentially" because the timing tests use chemfp code; I used the above to verify that the raw OpenBabel API matched one of my chemfp times.) Andrew da...@dalkescientific.com ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss