Issue Details (XML | Word | Printable)

Key: STDCXX-227
Type: Improvement Improvement
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Martin Sebor
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
C++ Standard Library

std::basic_string shared static data a performance bottleneck in SMP situations

Created: 29/Jun/06 01:31 AM   Updated: 01/Jun/07 09:08 PM
Return to search
Component/s: 21. Strings
Affects Version/s: 4.1.2, 4.1.3
Fix Version/s: None

Time Tracking:
Not Specified

Environment: all


 Description  « Hide
Moved from the Rogue Wave bug tracking database:

***Created By: yoder @ Oct 22, 2001 03:26:34 PM***

Customer maintains that shared static data such as the null object in basic_string is a performance bottleneck in SMP situations. The offered solution is to make it a thread specific object.

***Modified By: sebor @ Nov 14, 2001 06:28:14 PM***
Only reads from or writes to RAM (as opposed to ROM) may potentially incur a performance penalty. Reading the address of a shared object (which is what string does in most cases) is fast. To help the OS prevent any performance penalty at all, the empty string literal (or the entire null reference object) should be put in ROM (by making sure it is a POD, which it is, and by declaring it const, which it currently isn't).

***Modified By: sebor @ Oct 02, 2002 10:26:11 AM***
p4 describe 109937 makes the null reference type a POD. It's still not const, though.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Sebor made changes - 01/Jun/07 09:08 PM
Field Original Value New Value
Priority Major [ 3 ] Minor [ 4 ]