Alexander Nasonov's shared items

Showing posts with label boost. Show all posts
Showing posts with label boost. Show all posts

Friday, March 09, 2012

Popularity of boost versus popularity of pcre

Recently, there were two recursive PKGREVISION bumps in pkgsrc. One was after an update of devel/boost and the other was after an update of devel/pcre (Perl Compatible Regular Expressions). 59 files were bumped after boost update and 1657 + 68 files were bumped after pcre update. Even though boost has its own regex library but  it's way less popular in open-source world than pcre. You can draw your conclusions.

Friday, August 03, 2007

Friday, April 20, 2007

[boost] Announce: scope_exit version 0.03

Version 0.03 is available for download at http://tinyurl.com/yps8zs

You can read documentation online: http://194.6.223.221/~nasonov/scope_exit-0.03/libs/scope_exit/doc/html/

What's new in this version:

- Based on simpler 0.01 interface but with a better implementation - Found a problem on MSVC. It doesn't link when a block in a header file is included by more than one cpp file. I tried __declspec(selectany) and __forceinline. - Added experimental BOOST_SCOPE_EXIT_FASTER_IMPL. See documentation for details.

I'd like to remind you that nobody volunteered to be a review manager yet.

Monday, November 27, 2006

Saturday, August 26, 2006

[boost] [lexical_cast] optimization commited to HEAD

I just posted it to boost-devel list: http://lists.boost.org/Archives/boost/2006/08/109590.php Hello, I recently commited the version 1.26 of lexical_cast.hpp that optimizes many combinations of types. How it works: The lexical_cast reserves a local buffer for bool, char, wchar_t and other integral types. Then it puts a string representation of a source to the buffer. Currently, all such algorithms don't use ostream at all but it's easy to implement a generic algorithm that sets a put area of a ostream object to point to that buffer and puts a string representation to the buffer. When a source type is a pointer to char/wchar_t array or basic_string<>, its value is already a string representation of itself and a call to ostream output operator is omitted. Futher optimization is applied when a target type is either char/wchar_t or basic_string<>. In this case, std streams are not involved in a conversion at all. For all other target types, basic_istream object is contructed, its get area is set to a string representation of a source type and the operator>> is called. Optimization for the following source types is ON: bool char wchar_t other integral types char*, char const*, char[], char const[] wchar_t*, wchar_t const*, wchar_t[], wchar_t const[] std::basic_string<> Optimization for the following source types is OFF: enums float double signed char unsigned char signed char*, signed char const*, signed char[], signed char const[] unsigned char*, unsigned char const*, unsigned char[], unsigned char const[] all other types not listed in ON list Tested on VC6, VC7.1, VC8, gcc 3.4 and Borland 5.5. I couldn't run the test on Borland so I tested only that it compiles. Diff: cvs diff -r 1.24 -r 1.26 boost/lexical_cast.hpp http://tinyurl.com/qu388 Performance: Compiled with gcc 3.4.4 on FreeBSD 6.1 with -O2 flag turned on. A coversion from an int value [0, 9] to char. With Boost 1.33.1 - 2.012 s With Boost HEAD - 0.322 s, 6.24 times faster Ignore locales - 0.083 s A coversion from an int value [0, 999999] to std::string. With Boost 1.33.1 - 2.516 s With Boost HEAD - 0.844 s, 2.98 times faster Ignore locales - 0.626 s TODO - Optimization for float and double. - Make MEASURE_LEXICAL_CAST_PERFORMANCE_WITHOUT_LOCALE_OVERHEAD a public configuration parameter. - Discuss a behavior of enums with user-defined output operator.