Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Zero Optimization and Sign Optimization???

Reply
Thread Tools

Zero Optimization and Sign Optimization???

 
 
Ravikiran
Guest
Posts: n/a
 
      11-17-2008
Hi Friends,

I wanted know about whatt is ment by zero optimization and
sign optimization and its differences....


Thank you...




 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      11-17-2008
On 17 Nov, 08:42, Ravikiran <(E-Mail Removed)> wrote:

> * * * * *I wanted know about whatt is ment by zero optimization and
> sign optimization and its differences....


optimisation techniques are not on-topic for comp.lang.c.
Try comp.programming or a compiler group or just google it.

--
Nick Keighley
 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      11-17-2008
"christian.bau" wrote:
> Ravikiran <(E-Mail Removed)> wrote:
>
>> I wanted know about whatt is ment by zero optimization and sign
>> optimization and its differences....

>
> Whenever my company outsources programming jobs they specify in
> the contract how much optimisation is required. "Zero
> optimisation" means code that works, without being optimised. If
> we want optimisations, then someone in management has to sign
> because of the additional cost, so there is always a space left
> in the contract marked "Sign optimisation" where someone can sign
> to require optimisation.
>
> The differences between "sign optimisation" and "zero
> optimisation" can be many thousands in cost, plus delays in
> development of weeks, or even months.


Nonsense. If the compiler is accurate, and the code does not take
liberties with the standard, the only effect of optimization is to
speed up or compress (or both) the output code. However it may
reduce the ability to debug the final program.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
 
Reply With Quote
 
jameskuyper
Guest
Posts: n/a
 
      11-17-2008
CBFalconer wrote:
> "christian.bau" wrote:
> > Ravikiran <(E-Mail Removed)> wrote:

....
> > Whenever my company outsources programming jobs they specify in
> > the contract how much optimisation is required. "Zero
> > optimisation" means code that works, without being optimised. If
> > we want optimisations, then someone in management has to sign
> > because of the additional cost, so there is always a space left
> > in the contract marked "Sign optimisation" where someone can sign
> > to require optimisation.
> >
> > The differences between "sign optimisation" and "zero
> > optimisation" can be many thousands in cost, plus delays in
> > development of weeks, or even months.

>
> Nonsense. If the compiler is accurate, and the code does not take
> liberties with the standard, the only effect of optimization is to
> speed up or compress (or both) the output code. However it may
> reduce the ability to debug the final program.


Most real code takes some liberties with the standard, and most
compilers have some optimization options that render them slightly non-
conforming. Uncovering the "liberties" takes time and effort to fix.
Determining whether or not code modifications are required to take
advantage of non-conforming optimization options, and deciding whether
or not the optimization is worth the trouble, can take a lot of time.
Distinguishing between problems due to bad code and problems due to
dangerous optimizations also takes time.

However, I strongly suspect that Christian was not talking merely
about compiler optimization levels. I suspect he was also (perhaps
even mainly) talking about optimizations that require re-writing the
code. That requires taking the time to profile a program, determine
where it's wasting a lot of time, and then hand-optimizing those
particular sections. This will often involve a trade-off between
clarity, maintainability, cost, and efficiency. The sign-off would be
required to certify that management is willing to accept that this
trade-off is worth making. This is often denigrated as "micro-
optimization", and is (on rare occasions) absolutely necessary to meet
a performance requirement.

 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-18-2008
Ravikiran <(E-Mail Removed)> writes:
> I wanted know about whatt is ment by zero optimization and
> sign optimization and its differences....


Those aren't C language concepts, and I've never heard of them.

I just did a Google search for both terms; the only hits were for you
asking the question.

If you can tell us where you ran across these terms, we might be able
to give you an idea of a better place to ask about them, but I suspect
you've simply misunderstood something.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
 
Reply With Quote
 
Phil Carmody
Guest
Posts: n/a
 
      11-18-2008
Keith Thompson <(E-Mail Removed)> writes:
> Ravikiran <(E-Mail Removed)> writes:
>> I wanted know about whatt is ment by zero optimization and
>> sign optimization and its differences....

>
> Those aren't C language concepts, and I've never heard of them.


The only pair of /\b(sign|zero) \w+ion\b/ matches I can
think of is sign extension and zero extension, such as
in the x86 opcodes movsx and movzx.

But that ain't nuthin' to do with C.

Phil
--
I tried the Vista speech recognition by running the tutorial. I was
amazed, it was awesome, recognised every word I said. Then I said the
wrong word ... and it typed the right one. It was actually just
detecting a sound and printing the expected word! -- pbhj on /.
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      11-18-2008
On 17 Nov, 22:07, jameskuyper <(E-Mail Removed)> wrote:
> CBFalconer wrote:
> > "christian.bau" wrote:
> > > Ravikiran <(E-Mail Removed)> wrote:

> ...
> > > Whenever my company outsources programming jobs they specify in
> > > the contract how much optimisation is required. *"Zero
> > > optimisation" means code that works, without being optimised. If
> > > we want optimisations, then someone in management has to sign
> > > because of the additional cost, so there is always a space left
> > > in the contract marked "Sign optimisation" where someone can sign
> > > to require optimisation.

>
> > > The differences between "sign optimisation" and "zero
> > > optimisation" can be many thousands in cost, plus delays in
> > > development of weeks, or even months.

>
> > Nonsense. *If the compiler is accurate, and the code does not take
> > liberties with the standard, the only effect of optimization is to
> > speed up or compress (or both) the output code. *However it may
> > reduce the ability to debug the final program.

>
> Most real code takes some liberties with the standard, and most
> compilers have some optimization options that render them slightly non-
> conforming. Uncovering the "liberties" takes time and effort to fix.
> Determining whether or not code modifications are required to take
> advantage of non-conforming optimization options, and deciding whether
> or not the optimization is worth the trouble, can take a lot of time.
> Distinguishing between problems due to bad code and problems due to
> dangerous optimizations also takes time.
>
> However, I strongly suspect that Christian was not talking merely
> about compiler optimization levels.


I thought he was taking the micky


I suspect he was also (perhaps
> even mainly) talking about optimizations that require re-writing the
> code. That requires taking the time to profile a program, determine
> where it's wasting a lot of time, and then hand-optimizing those
> particular *sections. This will often involve a trade-off between
> clarity, maintainability, cost, and efficiency. The sign-off would be
> required to certify that management is willing to accept that this
> trade-off is worth making. This is often denigrated as "micro-
> optimization", and is (on rare occasions) absolutely necessary to meet
> a performance requirement.- Hide quoted text -
>
> - Show quoted text -


 
Reply With Quote
 
James Kuyper
Guest
Posts: n/a
 
      11-18-2008
Nick Keighley wrote:
> On 17 Nov, 22:07, jameskuyper <(E-Mail Removed)> wrote:
>> CBFalconer wrote:
>>> "christian.bau" wrote:
>>>> Ravikiran <(E-Mail Removed)> wrote:

>> ...
>>>> Whenever my company outsources programming jobs they specify in
>>>> the contract how much optimisation is required. "Zero
>>>> optimisation" means code that works, without being optimised. If
>>>> we want optimisations, then someone in management has to sign
>>>> because of the additional cost, so there is always a space left
>>>> in the contract marked "Sign optimisation" where someone can sign
>>>> to require optimisation.
>>>> The differences between "sign optimisation" and "zero
>>>> optimisation" can be many thousands in cost, plus delays in
>>>> development of weeks, or even months.

....
>> However, I strongly suspect that Christian was not talking merely
>> about compiler optimization levels.

>
> I thought he was taking the micky


I had to look that phrase up - I've never heard it before.

I doubt it - it looked like a perfectly serious response to. I've never
heard of "sign optimization", but Christian's answer provides a
plausible explanation of why someone might run into the words "sign" and
"optimization" juxtaposed in such a way that they could misinterpret
them as referring to something called "sign optimization".
 
Reply With Quote
 
Nick Keighley
Guest
Posts: n/a
 
      11-18-2008
On 18 Nov, 11:57, James Kuyper <(E-Mail Removed)> wrote:
> Nick Keighley wrote:
> > On 17 Nov, 22:07, jameskuyper <(E-Mail Removed)> wrote:
> >> CBFalconer wrote:
> >>> "christian.bau" wrote:
> >>>> Ravikiran <(E-Mail Removed)> wrote:



> >>>> Whenever my company outsources programming jobs they specify in
> >>>> the contract how much optimisation is required. *"Zero
> >>>> optimisation" means code that works, without being optimised. If
> >>>> we want optimisations, then someone in management has to sign
> >>>> because of the additional cost, so there is always a space left
> >>>> in the contract marked "Sign optimisation" where someone can sign
> >>>> to require optimisation.
> >>>> The differences between "sign optimisation" and "zero
> >>>> optimisation" can be many thousands in cost, plus delays in
> >>>> development of weeks, or even months.

> ...
> >> However, I strongly suspect that Christian was not talking merely
> >> about compiler optimization levels.

>
> > I thought he was taking the micky

>
> I had to look that phrase up - I've never heard it before.


I toyed with "taking the ****".
"taking the micky" is a UKism

> I doubt it - it looked like a perfectly serious response to. I've never
> heard of "sign optimization", but Christian's answer provides a
> plausible explanation of why someone might run into the words "sign" and
> "optimization" juxtaposed in such a way that they could misinterpret
> them as referring to something called "sign optimization


--
Nick Keighley
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      11-19-2008
"christian.bau" wrote:
> CBFalconer <(E-Mail Removed)> wrote:
>> "christian.bau" wrote:
>>> Ravikiran <(E-Mail Removed)> wrote:
>>>
>>>> I wanted know about whatt is ment by zero optimization and sign
>>>> optimization and its differences....
>>>
>>> Whenever my company outsources programming jobs they specify in
>>> the contract how much optimisation is required. "Zero
>>> optimisation" means code that works, without being optimised. If
>>> we want optimisations, then someone in management has to sign
>>> because of the additional cost, so there is always a space left
>>> in the contract marked "Sign optimisation" where someone can sign
>>> to require optimisation.
>>>
>>> The differences between "sign optimisation" and "zero
>>> optimisation" can be many thousands in cost, plus delays in
>>> development of weeks, or even months.

>>
>> Nonsense. If the compiler is accurate, and the code does not take
>> liberties with the standard, the only effect of optimization is to
>> speed up or compress (or both) the output code. However it may
>> reduce the ability to debug the final program.

>
> My dear CBFalconer, please explain to me what the compiler has to do
> with this. I am talking about source code; I am not even mentioning a
> programming language or that a compiler would be used.


Because if the compiler is inaccurate there is no guarantee that
the optimization step is accurate. Nobody in their right mind
optimizes by diddling source code.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
$ sign to gb pound sign PWB Computer Support 6 02-19-2007 03:06 AM
Automatic sign-up and sign-in across different domains without cookies? Jimmy ASP .Net 1 11-21-2006 04:41 PM
Automatic sign-up and sign-in between different domains without cookies? Jimmy Javascript 3 11-20-2006 01:28 PM
J sign instead of ? sign Harold Potter esq. Computer Support 5 04-16-2005 02:19 PM
Doubles and zero/negative zero Christopher Benson-Manica C Programming 4 07-01-2004 05:44 PM



Advertisments