2009/10/8 Lizhi Yang <yangli...@gmail.com> > Hi Adam, > > One more question, if I want to implement algorithms and load the huge > amount of data using C++, but using Python as the glue language to > implement other functionality such as Gui and txt processing, you > think Boost.python is better or SWIG is better? Have not tried yet, > just need to make decision first, thanks. > > On Thu, Oct 8, 2009 at 9:19 AM, Lizhi Yang <yangli...@gmail.com> wrote: > > Hi Adam, > > > > Thank you so much for your help. I will do a test, and will let you > > know the result. > > > > On Thu, Oct 8, 2009 at 9:15 AM, Adam Bark <adam.jt...@gmail.com> wrote: > >> 2009/10/8 Lizhi Yang <yangli...@gmail.com> > >>> > >>> Below you see my original post. > >>> > >>> 1: Say I use boost.python. > >>> 2: For example, I allocate a big array with integers using C++ > >>> function (4 bytes for each int in C++, but 12 bytes in python), and I > >>> use boost.python to call those C++ functions. How is the memory > >>> allocation for that array then? > >> > >> If the data is setup in C++ using native types then it will use 4 bytes > per > >> int. I believe boost just creates a wrapper so you can call the C++ > function > >> as if it were a python function it then does all the conversion > internally > >> and will return some python type data. > >> HTH > > >
Hi Lizhi, I don't really have much experience with either, personally, and I just realised I didn't reply-all my original response so I'm CC'ing this back to the list, hopefully you'll get a useful response there.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor