473,799 Members | 3,185 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Efficient program ?

14 New Member
Hi all,

After writing a program, how do you check whether your program is:
  1. CPU efficient
  2. memory efficient

How can assembly language learning help in writing an efficient program?


Regards,
Kishore
Jun 4 '09 #1
2 1795
JosAH
11,448 Recognized Expert MVP
@APmore
1: profile it;
2: profile it.

Forget about assembly language except for the most demanding performance or the most low level of programming (device access etc.)

kind regards,

Jos
Jun 5 '09 #2
APmore
14 New Member
@JosAH
Sorry for delay--I was with fever.

I am using the following tutorial for profiling:
http://www.netbeans.org/kb/docs/cnd/...?intcmp=925655

kindly, suggest if any better tutorials are there...


Regards,
Kishore
Jun 13 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
1460
by: Programmer | last post by:
Is this: int x; for (int count=0; count<200; count++) { x = someFunc(); anotherFunc(x); }
6
1505
by: malv | last post by:
Simple case: In this list, how to find all occurences of intervals of n adjacent indexes having at least one list-member with a value between given limits. Visualizing the list as a two-dimensional curve, this is like horizontally dragging a given rectangle over the curve and finding the x coordinates where the curve passes through the rectangle.(Define such a x-index coordinate as the left corner of the rectangle.) More complicated...
8
2449
by: brian.digipimp | last post by:
I turned this in for my programming fundamentals class for our second exam. I am a c++ newb, this is my first class I've taken. I got a good grade on this project I'm just wondering if there is a better and more efficient way to write this program. //This program calculates the users Gross Pay and subtracts the tax based off of Marital Status //and the number of exemptions they select #include <iostream>
16
1693
by: Dustan | last post by:
I have a program that uses up a lot of CPU and want to make it is efficient as possible with what I have to work with it. So which of the following would be more efficient, knowing that l is a list and size is a number? l=l del l If it makes a difference, everything in the list is mutable.
21
2026
by: py_genetic | last post by:
Hello, I'm importing large text files of data using csv. I would like to add some more auto sensing abilities. I'm considing sampling the data file and doing some fuzzy logic scoring on the attributes (colls in a data base/ csv file, eg. height weight income etc.) to determine the most efficient 'type' to convert the attribute coll into for further processing and efficient storage... Example row from sampled file data: , ....]
35
1807
by: spekyuman | last post by:
Pointer and reference arguments provide C++ programmers with the ability to modify objects. What is more efficient, passing arguments via pointer or reference? Avoid the stereotypical urge of debating effective coding style. Instead, think of particular scenarios: passing a 512MB object to function. Think behind the scenes, from the stack and heap to the physical linking and build of the program.
7
1816
by: Carlo Milanesi | last post by:
Hello, I just completed writing an online book about developing efficient software using the C++ language. You can find it here: http://en.wikibooks.org/wiki/Optimizing_C%2B%2B It is a wiki, that is everyone can change it or only add critical comments to the pages. Everyone is invited to improve it. But before applying major changes, please read these guidelines: http://en.wikibooks.org/wiki/Optimizing_C%2B%2B/Guidelines_for_editors
28
3908
by: Mahesh | last post by:
Hi, I am looking for efficient string cancatination c code. I did it using ptr but my code i think is not efficient. Please help. Thanks a lot
82
3744
by: Bill David | last post by:
SUBJECT: How to make this program more efficient? In my program, a thread will check update from server periodically and generate a stl::map for other part of this program to read data from. Let's name the update method as doUpdate and stl::map read methods as getData and copyData. Since stl::map is not thread-safe, we should do synchronization by ourselves. A usable solution is to create a boost::mutex::scoped_lock object in all above...
0
9685
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
9538
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
10470
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
10214
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
10023
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
9067
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...
0
6803
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();...
1
4135
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
3
2935
bsmnconsultancy
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...

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.