This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: debug mode performance patch


On 11/19/2010 11:51 PM, Paolo Carlini wrote:
Hi,

Well, I consider this code as a temporary limited workaround to the contention issue so I made it simple. Ideally a mutex should be associated to each safe sequence. Do you think that this workaround is going to last for a long time ? Otherwise I do not see the point of spending too much time on the best method to associate the mutex to the sequence.
Probably it's a bit overkilling, you are right. Not that it would make the code much more complex, anyway, and estetically I like that it allows to hide the ugly reinterpret cast. As I see it, probably the workaround will last quite a bit of time, in practice until we either break the ABI (definitely not tomorrow) or *you* decide to implement something even better or both.

Paolo
Hi

This is a new proposition. I don't know what you had exactly in mind when proposing to use _Hash_impl but I could not generate the hash code from the whole _Safe_sequence_base instance because when it is modified the hash code changes too of course. So I simply hash the safe sequence address as before but with more sophisticated hasher.

I also use autoconf 2.64 for autoreconf.

Regards

Attachment: performance.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]