ideas for C optimization wanted

Michael Hudson michael.hudson at canonical.com
Thu Jul 3 21:44:12 BST 2008


Colin D Bennett wrote:
> On Thu, 03 Jul 2008 16:16:53 +1200
> Michael Hudson <michael.hudson at canonical.com> wrote:
> 
>> Martin Pool wrote:
>>> Tim said to me he was interested in doing some C or Pyrex code to
>>> speed up Bazaar, and asked for suggestions on where to begin.
>> ...it reminded me that socket programming in C is horrible
>> so I'm not sure I'm going to go anywhere with this.
>>
>> Cheers,
>> mwh
> 
> I haven't used it myself, but I've heard that the Boost C++ 'asio'
> library provides a much improved socket interface (using C++ I/O
> streams).  See an example at:
> 
> http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/tutorial/tutdaytime1.html
> 
> C++ should be essentially as fast as C in this case, since there would
> be no huge libraries to load at runtime.  The Boost asio library is
> composed solely of header files.
> 
> Just thought I'd throw this out there.

Hm, that would probably be an improvement, but tbh, the hard parts of 
making this approach useful are mostly advanced unix yoga to do with 
controlling terminals and so on.  I probably should have left out the C 
bashing in my post...

Cheers,
mwh



More information about the bazaar mailing list