What are the best methods to do C,C++ code optimization manually ?
I has gone though some links sill not satisfied.
Can any one send me best optimization links 4 1752
swathi wrote:
What are the best methods to do C,C++ code optimization manually ?
I has gone though some links sill not satisfied.
Can any one send me best optimization links
Try "Efficient C++" book. The main thing to understand is that any
optimizations should be based on measuring and analyzing.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
swathi <ax*****@gmail. comwrote in news:1180451684 .020073.20780
@g37g2000prf.go oglegroups.com:
What are the best methods to do C,C++ code optimization manually ?
I has gone though some links sill not satisfied.
Can any one send me best optimization links
Measure, measure, measure. Use some sort of profiling tool to find out
where your code is _actually_ too slow. Then look at why that code would
be too slow and fix it. Usually by changing algorithms.
Andre Kostur wrote:
swathi <ax*****@gmail. comwrote in news:1180451684 .020073.20780
@g37g2000prf.go oglegroups.com:
>What are the best methods to do C,C++ code optimization manually ? I has gone though some links sill not satisfied. Can any one send me best optimization links
Measure, measure, measure. Use some sort of profiling tool to find
out where your code is _actually_ too slow. Then look at why that
code would be too slow and fix it. Usually by changing algorithms.
The usual spiel about what to do after you measure, is "prevent extra
work from being performed" and "cache everything you can" and "use
lookup tables everywhere". When none of those are possible (i.e. they
have all been already applied), rearrange your objects in memory to
reduce CPU cache misses and page faults. Oh, and one more is "do all
work when the user is not looking", i.e. in the "background ". Good
luck!
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
On May 29, 11:14 am, swathi <axel...@gmail. comwrote:
What are the best methods to do C,C++ code optimization manually ?
I has gone though some links sill not satisfied.
Can any one send me best optimization links
The following article describes C and C++ optimization techniques: http://www.eventhelix.com/RealtimeMa...AndCPPCode.htm
--
EventStudio 4.0 - http://www.EventHelix.com/EventStudio
Model in Plain Text; Generate Sequence Diagrams in PDF/Word This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Antoon Pardon |
last post by:
Well at least I find them missing.
For the moment I frequently come across the following cases.
1) Two files, each with key-value pairs for the same dictionary.
However it is an error if the second file contains a key that
was not in the first file.
In treating the second file I miss a 'set' method.
dct.set(key, value) would be equivallent to dct = value,
|
by: DrUg13 |
last post by:
In java, this seems so easy. You need a new object
Object test = new Object() gives me exactly what I want.
could someone please help me understand the different ways to do the
same thing in C++. I find my self sometimes, trying
Object app = Object();
Object *app = Object();
Object app = new Object();
|
by: PWalker |
last post by:
Hi, I have written code that I would like to optimize. I need to push it to
the limit interms of speed as the accuracy of results are proportional to
runtime.
First off, would anyone know any resources that explains how to optimize
code i.e. give some rules on c++ optimization? e.g. using memcpy to copy an
array (which i have done).
Also, what is the best sorting algorithm out there for sorting an array of
of size 100 or less? I have...
|
by: Felix I. Wyss |
last post by:
Good Afternoon,
I recently noticed that some very simple methods of a template declared and
used in a DLL library get inlined when used by the DLL itself, but not by
other DLLs and EXEs. After some investigating, I narrowed this down to a
very odd behavior (bug?) of the VC++.NET 2003 compiler: If a class that is
declared as __declspec(dllimport) derives from a template, that template's
methods are never inlined, even if declared with...
|
by: Andrew Brampton |
last post by:
Hi,
This may sound a odd question, but I wanted to know how you return a list of
data from a function. These are some of the ways I know how, and I was
wondering which method you normally use. This is more of a best practices
question rather than a technical one.
1) Return a list instance ie
std::list myFunction() {
std::list list();
return list;
| |
by: Earl |
last post by:
I have all of my data operations in a separate library, so I'm looking for
what might be termed "best practices" on a return type from those classes.
For example, let's say I send an update from the UI layer to a method in a
library class that calls the stored procedure. Best to return a boolean
indicating success/failure, return a string with the exception message, or
just return the entire exception?
|
by: Joe |
last post by:
Is any one charting packing considered to be the "best"? We've used ChartFX
but wasn't too happy about the way data had to be populated along with some
other issues which slip my mind right now and Dundas has bugs and doesn't do
a good enough job displaying axis labels and is very slow to paint large
numbers of series and data points.
We're currently evaluating ProEssentials which we are happy with but it's
not a native .NET package.
...
|
by: per9000 |
last post by:
Hi,
I wanted to test to compile an application I build for .NET 2.0 in
with the 1.1 C# compiler. I encountered difficulties since I had a
List<myClass>. I found a list of what is new in .NET 2.0 and generics
is on it - I assume this is why I encounter problems. So this raises a
number of questions:
- What is the best replacement of List<intin 1.1 (or is the list
just in another namespace)?
|
by: Zach |
last post by:
I was reading about partial methods in the upcoming C# 3.0 with a
friends and we were having a discussion about their usefulness.
One on hand, they seem to be ok at providing a solution for allowing a
class to be extended at compile time by users of the class, and as
pointed out in some articles and papers they are good at acting as
lightweight event handlers.
On the other hand, they are in my eyes exactly almost a strict subset
of...
|
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,...
|
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...
| |
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |