2 Dec
2006
2 Dec
'06
12:53 p.m.
Hi all, I have some very light functions that get called enormous numbers of times. I'd like to get them running as fast as possible, even if it makes them ugly. The functions do several integer comparisons but no floating-point computation, so I'd like to port them to C/C++ rather than Fortran. While weave.inline has been rocking my world for most applications, on my computer the gateway alone seems to take about 1s per 100k calls, which is quite a bit of overhead for functions this small. Could anyone help me figure out which python-to-C method (swig, boost::python, etc) is fastest for tiny functions? I know ahead of time what types all the arguments will be. Thanks very much as always, Anand