11 Jul
2009
11 Jul
'09
3:08 p.m.
On Thursday 09 July 2009 05:00:47 Tyomich on the AIR wrote:
And then when I use a simple function which just increments the x member of every object, this function takes about 4 seconds to process the whole list (1000000 items) of Boost-wrapped objects and less than a second to process objects of my own wrapping! How this can be possible? Is Boost.Python much more slower than Python itself?
Boost.Python is a little slower than wrapping directly using Python C-API, especially in very simple cases like yours. (It is a variant of the abstraction penalty.) However, it is hard to believe that it is 4x slower. Would you mind posting complete compilable examples so that we can take a look at it? Regards, Ravi