Building a performance static analyser


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Building a performance static analyser
# 8  
Old 06-16-2010
Thank you for your answer. I understand correctly that memusage is a part of Glibc (ftp://ftp.gnu.org/gnu/glibc/)?
Indeed I am looking to formalise those best practices that you mention, if not different than best practices already in use for static code analysis.
# 9  
Old 06-16-2010
Yes, memusage comes with glibc - or on my OS (CentOS) as part of the glibc-utils package.

As far as best practices go...if you're coding in C, there are a lot of "style" guides available at various sites, but often, it's more the logic of the programming that dictates how it's going to run, performance wise. Good optimizing compilers will do what they do, and more often than not, specific coding styles don't end up producing greatly different binaries. If you want to crank out the most efficient code possible, there are books about that, but it becomes complex, hardware dependent and difficult to manage FAST, along with requiring a lot of esoteric knowledge from the coders.

So, coding guidelines are more for other coders reading the code. Which is definitely worth looking at.

Performance-wise, it's much more about logic, like I said, and ends up being a trade off of a lot of factors - memory, disk I/O, processor time, etc. In some cases, a not terribly elegant loop (which will use a lot of processor) may be better than the alternative that spares the CPU but does a lot of i/o. And so forth.
# 10  
Old 06-17-2010
Thank you for all your answers.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. OS X (Apple)

Text mode AF spectrum analyser.

Well guys, this MUST be a first. This is DEMO code only and has NO error detection or correction, nor out of bounds checking. I have succumbed to Python and scipy to do the FFT heavy lifting as I have absolutely no idea where to start do such a thing using AWK. This is a taster for me to... (7 Replies)
Discussion started by: wisecracker
7 Replies

2. Infrastructure Monitoring

Awstats webserver analyser

Need assistance in troubleshooting I have configured awstats 7.3 version on RedHat linux and I am stuck at getting the updates from the website . Please let me know if anybody can give me some inputs I can see the webpages but it gives "Never updated (See 'Build/Update' on awstats_setup.html... (2 Replies)
Discussion started by: ajayram_arya
2 Replies

3. Programming

Even the Static cURL Library Isn't Static

I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a... (8 Replies)
Discussion started by: BrandonShw
8 Replies

4. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

5. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies
Login or Register to Ask a Question