Re: [Boost-users] 3 times slower than c++
Dear all, We are writing a python toolbox and wrapping it from c++ is much faster than pure python. But my wrapped c++ code(called in python) is 3 times(not plus a constant time) slower than the orignial c++ one. I think the difference should be a constant not a factor. Because all the computation has been taken in *.so, the extra time cost is the time python load it at the beginning. Is that right? Any opinion or suggestion about why or how to speed it up? Best wishes! Javen On 9/11/06, boost-users-request@lists.boost.org < boost-users-request@lists.boost.org> wrote:
Send Boost-users mailing list submissions to boost-users@lists.boost.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.boost.org/mailman/listinfo.cgi/boost-users or, via email, send a message with subject or body 'help' to boost-users-request@lists.boost.org
You can reach the person managing the list at boost-users-owner@lists.boost.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Boost-users digest..."
Today's Topics:
1. Re: having a problem seeding random number generator. (Jim Ingram) 2. Re: [string_algo] wildcard support? (Pavol Droba) 3. Re: Absolute Quanfusion : was Re: [fusion] transform a vector of values to refs (Andy Little) 4. Properties (newbie) (Olivier Tournaire) 5. 3 times slower than c++? (Qinfeng(Javen) Shi ) 6. Re: 3 times slower than c++? (Andy Little) 7. Re: Lock pointer implementation (Mattias Br?ndstr?m) 8. Re: Lock pointer implementation (Mattias Brandstrom) 9. Re: Link error with boost regex and STLport (Maik Beckmann)
----------------------------------------------------------------------
Message: 1 Date: Sun, 10 Sep 2006 15:38:41 +0000 (UTC) From: Jim Ingram
Subject: Re: [Boost-users] having a problem seeding random number generator. To: boost-users@lists.boost.org Message-ID: Content-Type: text/plain; charset=us-ascii Daniel James
writes: The problem is that 'variate_generator' stores a copy of the engine, not a reference.
Wow. You'd think that between the docs, the header files, and the example code, I would have caught that. It does make a lot more sense to have the generator and distribution encapsulated inside a variate_generator instead of maintaining them seperately.
Thanks for pointing that out.
-- Jim
------------------------------
Message: 2 Date: Sun, 10 Sep 2006 20:29:09 +0200 From: Pavol Droba
Subject: Re: [Boost-users] [string_algo] wildcard support? To: boost-users@lists.boost.org Message-ID: <45045975.1090701@topmail.sk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi,
Andriy Tylychko (mail.ru) wrote:
To community and especially to Pavol Droba as the author of string_algo: What do you think about popularity of wildcards as the tool for
Is it worth to add wildcards support to the library? To what library? Is
end-users? the
boost-development mailing list a better place for this discussion?
I can only express my personal opinion here and that is : the wildcards should not be a directly supported in string_algo library.
Reason is simple: the functionality provided by wildcards is superseeded by regex in all respects. In addition, as you have explained in your previous mail, it is easy to convert a wildcard to a regex.
I can't say if the support could be incorporated into Boost.Regex. This library already support several syntaxes, so wildcards could be just another variant. But this is more question to John Maddock.
You can also try to cleanup your conversion utility and offer it to boost, to get a response from whole comunity.
Regards, Pavol
------------------------------
Message: 3 Date: Sun, 10 Sep 2006 19:33:32 +0100 From: "Andy Little"
Subject: Re: [Boost-users] Absolute Quanfusion : was Re: [fusion] transform a vector of values to refs To: boost-users@lists.boost.org Message-ID: Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original "Joel de Guzman"
wrote in message news:edv1e0$n73$1@sea.gmane.org... Sounds good. Okidoki.
Great. I will see if I can get on with it, rather than spend more time mucking about with fusion ;-)
regards Andy Little
------------------------------
Message: 4 Date: Sun, 10 Sep 2006 21:57:17 +0200 From: Olivier Tournaire
Subject: [Boost-users] Properties (newbie) To: boost-users@lists.boost.org Message-ID: <45046E1D.7040709@yahoo.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all,
I am a new boost user (2 days old ...). I just want to know a few things.
1. I use an adjacency_list with my own properties to store my graph. I just want to know if it is possible to manipulate directly the properties' values. At the moment, I use get(...) to obtain the property, make my change, and use put(...) to set the new value.
2. My graph cannot contain parallel edges, so I use a setS. However, the documentation says that listS or vecS is more efficient in time and space complexity. Is it possible to use std::vector or std::list and to disallow parallele edges ?
Thanks in advance Olivier
------------------------------
Message: 5 Date: Mon, 11 Sep 2006 09:54:43 +1000 From: "Qinfeng(Javen) Shi "
Subject: [Boost-users] 3 times slower than c++? To: boost-users@lists.boost.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" Dear all,
I wrapped a c++ code into python. It works but it is 3 times slower than the orignial c++ one. Is that normal? Is there something I can do to speed it up?
Thanks!
-- Qinfeng(Javen) Shi
Research School of Information Sciences and Engineering Australian National University Locked Bag 8001 Canberra ACT 2601
"Qinfeng(Javen) Shi "
Dear all,
We are writing a python toolbox and wrapping it from c++ is much faster than pure python. But my wrapped c++ code(called in python) is 3 times(not plus a constant time) slower than the orignial c++ one.
Qinfeng, I'm not a moderator on this list, but this posting strikes me as rather impolite. First of all, you replied to a digest and included the entire text of all the postings in the digest. Some people have to pay for every byte they download. Secondly, you've ignored my repeated calls to take Boost.Python questions to the appropriate list. As the author of Boost.Python, I ought to know that it's the right place for you to get help. Here it is again: http://www.boost.org/more/mailing_lists.htm#cplussig -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Qinfeng(Javen) Shi