473,788 Members | 2,896 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiler warnings and performance

Hi,

I have built an application containing a few projects (nothing that I have
written)and there are a few compiler warnings (obsolete methods and the like).

Does anyone know if these obsolete methods cause any performance issues if
not corrected? I would imagine that they do, but would be interested to know
to what extent.
Jun 27 '08 #1
3 1324
On Tue, 22 Apr 2008 08:17:02 -0700, cashdeskmac
<ca*********@di scussions.micro soft.comwrote:
I have built an application containing a few projects (nothing that I
have
written)and there are a few compiler warnings (obsolete methods and the
like).

Does anyone know if these obsolete methods cause any performance issues
if
not corrected? I would imagine that they do, but would be interested to
know
to what extent.
Why would they?

Deprecated/obsolete methods usually happen because the .NET designers feel
they came up with a better way to do something. That doesn't necessarily
mean that the older way performed more poorly.

If you have a specific example, I'm sure some specific advice can be
offered. Other than that, I'd say that the general rule of thumb is to
try hard to avoid having warnings in your code. Not because they might
imply poor performance, but because they are usually telling you something
important about the way you wrote your code that could lead to other
problems (such as incorrect output, lack of a future-proof upgrade path,
etc.).

Pete
Jun 27 '08 #2
On Apr 22, 8:17*am, cashdeskmac
<cashdesk...@di scussions.micro soft.comwrote:
Hi,

I have built an application containing a few projects (nothing that I have
written)and there are a few compiler warnings (obsolete methods and the like).

Does anyone know if these obsolete methods cause any performance issues if
not corrected? *I would imagine that they do, but would be interested toknow
to what extent.
IMHO, I think performance concerns should be the least of your worries
if you have code with obsolete warings.
I would have to assume there isn't any way to measure performance
using obsolete api's on a machine with multiple .NET runtimes.
Jun 27 '08 #3
As I said, it wasn't code that I had written. This is part of an application
containing over 380 projects and which has been upgraded from v1.1 to v3.0 in
the last few months. It has also had an upgrade to a third party data
retrieval layer and it is this which is creating all of the obselete method
warnings. As is often the case, though, there is no money to pay for a clean
up of the code, so things will probably be left as they are.
Jun 27 '08 #4

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

Similar topics

10
2211
by: Kylotan | last post by:
I have the following code: def IntToRandFloat(x): """Given a 32-bit integer, return a float in """ x = int(x) x = int(x << 13) ^ x return (1.0-((x*(x*x*15731+789221)+1376312589)&0x7fffffff)/1073741824.0) Basically it's a function directly copied from a C implementation. Now
5
11231
by: dis | last post by:
I've been going through my code and clearing away some of the compiler warnings that i'm generating and i've come across areas where i cast pointers to integer values. The Visual Studio compiler generates this warning ... "warning C4311: 'type cast' : pointer truncation from 'void *' to 'DWORD'" The warning is generated as the pointer is apparently 64 bits long (even though a quick sizeof() reports it to only be 4 bytes in length) and...
20
2732
by: News | last post by:
I'm new to c and gcc. I was wondering if anyone can point me to a web page or book that has a list of the warning messages and their meanings. Are the warnings the same no matter what compiler you use, or are they different for each compiler? I have looked all over the gcc web site, but I can't find anything that explains what the warnings are. If someone could take the time to help me out and direct me to some info about this, I'd...
43
2756
by: Anitha | last post by:
Hi I observed something while coding the other day: if I declare a character array as char s, and try to use it as any other character array..it works perfectly fine most of the times. It holds strings of any length. I guess what is happening here is that this array initially holds only '\0' and hence is of length 1. But sometimes, when I tried to write some functions and do some
2
1724
by: Samuel | last post by:
Imagine you have the following code: try { ... } catch (ThreadAbortException eThread) { if (WorkStopped != null) WorkStopped(this, EventArgs.Empty) }
5
1323
by: Sean Wolfe | last post by:
I have a request for the c# compiler one that is an obvious oversight in my opinion. I'm not sure if this is already being implemented in Whidebey, bu i would hope to find it in there, or in the next version. Working with properties, and the neaming convention that Microsoft has recommended for developing in C#, it is easy for one to have a circular reference. This reference could easily be prevented by a Compiler error, but as of 1.1...
5
1796
by: rawCoder | last post by:
Hi All, In Visual Basic .NET , your function definition might requirre you to return a value but (accidently/intentionally) you dont put any 'return value' in the function. In this case VB Compiler does not generate any warning. Is there any way to make the compiler generate this and other obvious warnings, is there any switch, or still VB.NET development team assumes that
11
23242
by: Charles Sullivan | last post by:
I have a number of functions, e.g.: int funct1( int arg1, int arg2, int arg3 ); int funct2( int arg1, int arg2, int arg3 ); int funct3( int arg1, int arg2, int arg3 ); that are called via pointers in a table, with the same parameters regardless of the particular function. In some of the functions, one or more of the
3
3198
by: gil | last post by:
Hi, I'm trying to find the best way to work with compiler warnings. I'd like to remove *all* warnings from the code, and playing around with the warning level, I've noticed that compiling with /W3 I get warnings that with /W4 are shown as remarks, e.g.: warning #177: variable "Foo" was declared but never referenced ....is displayed as a "remark #177" with /W4. That doesn't fit the
0
9498
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
10364
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...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
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...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
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.