November 28, 2007

Some tips for Boost.Asio

Yesterday, during experiments i had found, that usage of streambuf from boost.asio could heavily decrease performance of program, especially if it used for moving of big amounts of data.
In my test examples (http proxy) streambuf was used for reading of headers of requests/responses between client and server (reading was done with read_until and corresponding regex), and after parsing, body of request/response was read (in loop). By replacing of streambuf to boost::array for operation of body transfer increase performance of application up to 30%.
So, i suggest to use fixed size buffers instead of streambuf where this possible

November 23, 2007

About functional programming on Channel9

During the last week the Microsoft's Channel9 present to their users several video lectures on functional programming - interview with Don Syme about "What new in F#" and lecture about monads by Brain Beckman.
In general, last time on this channel was many very interesting videos, for example, interview from conference "Java and object-oriented software engineering 2007", or several videos, that could be used as introduction to F# programming.