Re: const_cast question
From: Bill Seurer (seurer_at_us.ibm.com)
Date: 05/05/04
- Next message: Corne' Cornelius: "Weirdness: (-0.666667 + 0.333333)"
- Previous message: Bill Seurer: "Re: [OT] Challenge response."
- In reply to: George Privalov: "Re: const_cast question"
- Next in thread: Siemel Naran: "Re: const_cast question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 05 May 2004 07:29:57 -0500
George Privalov wrote:
> Bill Seurer <seurer@us.ibm.com> wrote in message news:<c7801c$1e8q$1@news.rchland.ibm.com>...
>
>>People want their code to be as fast as possible so they throw in all
>>the "tricks" they have learned (or just heard of) to make it faster even
>>if their code breaks the "contract" that those tricks require. It's
>>fairly obviously for something like this but a lot trickier other times.
>> I see this quite frequently with the aliasing rules and optimization
>>in my compiler work.
>
>
> I can not come up with one example when casting away constness should
> improve the code's performance.
No, no. The other way round. They stick in const thinking it makes the
code faster and then break it by casting away const because the stuff
really wasn't const to begin with.
- Next message: Corne' Cornelius: "Weirdness: (-0.666667 + 0.333333)"
- Previous message: Bill Seurer: "Re: [OT] Challenge response."
- In reply to: George Privalov: "Re: const_cast question"
- Next in thread: Siemel Naran: "Re: const_cast question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|