-
Recent Posts
Recent Comments
Ashis Kumar Sahu on Understanding SCTE-35 Slice vs Tile in H.2… on HEVC – What are CTU, CU,… Manish Pednekar on Understanding SCTE-35 How can I determine… on HEVC – What are CTU, CU,… Bartek Zdanowski on Understanding SCTE-35 Archives
- February 2014
- October 2013
- March 2013
- November 2012
- October 2012
- September 2012
- August 2012
- March 2012
- February 2012
- December 2011
- July 2011
- June 2011
- January 2011
- December 2010
- November 2010
- May 2010
- April 2010
- January 2010
- November 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- January 2009
- December 2008
- November 2008
- October 2008
Categories
Meta
Category Archives: Optimization
Condition variables performance of boost, Win32, and the C++11 standard library
About four years ago, I wrote the condition variables in Win32 API was much faster than boost threading library implementation. Since then the boost threading library has been rewritten and C++11 has introduced the threading support in the standard library. … Continue reading
Use IO Completion port to implement thread safe FIFO
Here is an example to implement thread safe FIFO using IO Completion port as a queue implementation. The implementation assumes there is only on thread pushing and another thread pulling. /*! A thread safe FIFO object with single thread push … Continue reading
Posted in Optimization
1 Comment
Win32 native monitor is much faster than boost
Windows Vista (finally!) introduced APIs to build a monitor object.http://msdn2.microsoft.com/en-us/library/ms683469.aspx So, how’s performance? Let’s benchmark it. I wrote two bounded FIFO classes. One was based on boost threading library (http://www.boost.org/doc/html/thread.html) and the other was based on the new Win32 APIs. … Continue reading
Posted in Optimization
1 Comment
Non-alignment integer access performance
When you define a structure like this, the integer field is allocated not just after the byte field, but aligned to 4 byte boundary. struct foo{ unsigned char v1; unsigned int v2;}; It’s because x86 architecture has a performance issue … Continue reading
Posted in Optimization
2 Comments
Optimization with C++ Template
C++ template can be used for enabling optimization. For example, you have a function: void foo(int x){ // … int v = n / x; // slow division operation // … } And call it. foo(16); Let’s assume foo is … Continue reading
Posted in Optimization
Leave a comment