> For something like this, it would be better to write a function that performs the operation on the million+ Points in C++ and expose that function to Python.  > This would be a better alternative to both using Boost.Python or wrapping it by hand.
>
> Kamal

Probably it would, but the point is to add some scriptability to the code so that I could do (almost) whatever I want with data.
By the way, folks from Boost-users list asked for compilable examples and here they are: http://www.filefactory.com/file/ahda0d8/n/_export_Boost_vs_pure_Python_7z (if someone is interested)

I got these results in the test:

Getting boost.python point 1000000 times:
0.302821578459
Getting Python point 1000000 times:
0.121208008078

Setting boost.python point 1000000 times:
0.373980616451
Setting Python point 1000000 times:
0.109051436823

Increasing boost.python point 1000000 times:
0.708493801882
Increasing Python point 1000000 times:
0.20538183019

The numbers are time in seconds taken to accomplish calculations.
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to