-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Michael Marcin Sent: Wednesday, April 25, 2007 11:33 AM To: boost-users@lists.boost.org Subject: [Boost-users] [scoped_array] "optimization"
Hello,
I have a new programmer on my team who has been brought on as an optimization engineer. She has a lot more experience than I do but I fear some of that experience may have left impressions that have stuck with her for too long. On the first check in labeled spot optimizations there were many things changed that disturbed me. One of them was changing a class from essentially.
Besides the things you mention (the code being plain wrong!), I can't imagine there is any optimization going on here. The only optimizations worth doing are ones you can measure. Anything else is just guessing. That being said, you should ask why she felt that was an optimization. It could be at one point delete[] did something really stupid for primitive types for some compiler but delete still deallocated the memory. Who knows. The dark corners of our experiences we'd rather forget still make us who we are :-) Make sure she knows the difference between delete and delete[]. Anyway, none of this should be true for a modern compiler. Make sure she knows that too! Sohail