SWIG overhead

Bart Ogryczak B.Ogryczak at gmail.com
Thu Feb 1 06:21:42 EST 2007


On Feb 1, 12:12 pm, Phil Thompson <p... at riverbankcomputing.co.uk>
wrote:
> On Thursday 01 February 2007 10:21 am, Bart Ogryczak wrote:
>
> > Hi,
> > I´m looking for some benchmarks comparing SWIG generated modules with
> > modules made directly with C/Python API. Just how much overhead does
> > SWIG give? Doing profile of my code I see, that it spends quiet some
> > time in functions like _swig_setattr_nondinamic, _swig_setattr,
> > _swig_getattr.
>
> There was a EuroPython paper describing some benchmarks. It's from 2004 so
> things have probably changed a bit (SIP is now fully documented for example).
>
> http://people.web.psi.ch/geus/talks/europython2004_geus.pdf

Yeah, found that one googling around. But I haven´t fund anything more
up to date. I imagine, that the performance of all of these wrappers
has been improved since then. But the performance of Python/C API
would too?
Anyways, it´s not about exact number, it´s more about taking decision
if doing rewrite is worth it´s time.






More information about the Python-list mailing list