473,883 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Zero Optimization and Sign Optimization???

Hi Friends,

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


Nov 17 '08 #1
20 2369
On 17 Nov, 08:42, Ravikiran <ravisattig...@ gmail.comwrote:
* * * * *I wanted know about whatt is ment by zero optimizationand
sign optimization and its differences....
optimisation techniques are not on-topic for comp.lang.c.
Try comp.programmin g or a compiler group or just google it.

--
Nick Keighley
Nov 17 '08 #2
On Nov 17, 8:42*am, Ravikiran <ravisattig...@ gmail.comwrote:
Hi Friends,

* * * * *I wanted know about whatt is ment by zero optimizationand
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.
Hope this answers your question.

Nov 17 '08 #3
"christian. bau" wrote:
Ravikiran <ravisattig...@ gmail.comwrote:
>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.
Nov 17 '08 #4
CBFalconer wrote:
"christian. bau" wrote:
Ravikiran <ravisattig...@ gmail.comwrote:
....
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.

Nov 17 '08 #5
Ravikiran <ra***********@ gmail.comwrites :
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_Keit h) ks***@mib.org <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"
Nov 18 '08 #6
Keith Thompson <ks***@mib.orgw rites:
Ravikiran <ra***********@ gmail.comwrites :
> 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 /.
Nov 18 '08 #7
On 17 Nov, 22:07, jameskuyper <jameskuy...@ve rizon.netwrote:
CBFalconer wrote:
"christian. bau" wrote:
Ravikiran <ravisattig...@ gmail.comwrote:
...
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 -
Nov 18 '08 #8
On Nov 17, 9:44*pm, CBFalconer <cbfalco...@yah oo.comwrote:
"christian. bau" wrote:
Ravikiran <ravisattig...@ gmail.comwrote:
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.
Nov 18 '08 #9
Nick Keighley wrote:
On 17 Nov, 22:07, jameskuyper <jameskuy...@ve rizon.netwrote:
>CBFalconer wrote:
>>"christian.ba u" wrote:
Ravikiran <ravisattig...@ gmail.comwrote:
...
>>>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
developmen t 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
"optimizati on" juxtaposed in such a way that they could misinterpret
them as referring to something called "sign optimization".
Nov 18 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
2874
by: matthias_k | last post by:
Hi, I am currently implementing a solver for linear optimization problems using the revised simplex method and I stumbled accross some strange behavior regarding the treatment of the number 0. I am not sure whether this is compiler or language related though. The first problem is, that there are two representations of zero, namely +0 and -0. Does IEEE for floating points allow this? Maybe I didn't activate IEEE floating point numbers?
1
2026
by: florian.boldt | last post by:
Hi Folks, one of our developers uses a statement with a where clause which usually does not match to any rows. In case of one or more rows found she wrote a an expression in the select clause which evaluates to a "division by zero" on purpose to raise an alarm (dirty) This is the statement: SELECT
4
5861
by: Christopher Benson-Manica | last post by:
How does one determine whether a double is equal to -0.0000...? Will fabs() from math.h return 0.000... on -0.0000...? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
8
4658
by: Avin Patel | last post by:
Hi, Does the Double has the facilty to define -0. If it has, "==" or System.Math.Sign() doesn't able to differentiate between -0 & 0. i.e. Double x = -0.0d Double y = 0.0d if(value == -0.0d) {//both x & y drops in this statement.
23
4386
by: Hallvard B Furuseth | last post by:
As far as I can tell, (x & -1) is nonzero if the integer x is negative zero. So for signed types, x == 0 does not guarantee (x & foo) == 0. Is that right? (Not that I expect to ever encounter a non-two's-complement machine. Just wondering.) -- Hallvard
8
2231
by: cppquester | last post by:
I am forced to work with a char* buf; I allocate memory and then construct some data types in buf (several different at different locations of buf kind of struct alike) Sometimes all data need to be zeroed. For integral types that is fine, I just zero all
0
9945
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9798
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10863
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7136
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5807
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4622
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.