Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Performance of basic_string

Posted on 1999-07-12
2
Medium Priority
?
185 Views
Last Modified: 2010-04-16
I have an app that has several (up to 128) threads, every thread dealing with one serial port. I use different DLLs for providing some transfer-protokolls. The DLLs I've written used plain C-Strings. Now I'm writing a new DLL, and I want to use the basic_string from the standard library. Does anyone know the performance-behavor of this class, especially for the multi-threading aspect (or any ressource where I can find this information?). I'm using VC++ 6.0 SP3.
0
Comment
Question by:ashman061699
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 150 total points
ID: 1199760
The STL string class should be very efficient for you.  The class uses reference counted string buffers which eliminates unnecessary copying of the string information.  The multithreaded version of this is slightly slower---though in any real applucation, imeasurably slower--as it must use interlocked operations to manipulate the reference counts.  These interlocked operarations take an extra clock cycle or two, but that really won't affect you.
0
 

Author Comment

by:ashman061699
ID: 1199761
Thanx, nietod.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question