------- Additional Comments From dhruvbird at yahoo dot com 2005-04-13 16:56 ------- (In reply to comment #19) > I want to emphasize here again one principle of C and C++: Trust the > programmers, and allow them to do low-level tunings for performance. Or what > is > the purpose of C++ (when compared with "high-level" languages like Python)? > This "fix" rid the programmers of their right to choose the way they want. > > Unless the future C++ standard demands protection in such cases, I do not > think > the compiler-provided mechanism a good idea.
I would agree with you. Btw, what is the approach adopted in case the app. is a single threaded one? Are the locks still taken in this case? Also, if it is an mt-app. but the programmer is sure that that particula function will NOT be reentrant, why should he pay the penalty of a lock or/and a check every time the function is called? Stroustrup continuously emphasised that C++ was designed to be as fast if not faster than C in most respects, and I guess that's why C++ is gaining popularity. If it were to use the java approach then it would be just another bloat-language.... -Dhruv. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13684