Advertisement

Fast Codes

Started by June 26, 2001 12:37 PM
5 comments, last by Yaskil 23 years, 7 months ago
Is there anybody knows any tools (preferred freeware ) for optimizing c/c++ codes or any suggestions for writing my own? i mean which way should i follow to decide the written code is the best or has open room for improvement. Life is beautiful
Life is beautiful
What development tool are you using?

If you are using Visual C++ Professional or Enterprise edition it comes with a Profiler which is an invaluable tool for optimizing. It will tell you which routines are taking up the most amount of CPU time and you can work on optimizing those routines.

Seeya
Krippy
Advertisement
If your program is math intensive then you can use MMX in inline assembly. It runs on most new processors, and if a processor doesn''t support MMX you could tell it to use ordinary code too. Check the intel web site for more info.
I have been using microsoft visual c++ but i am not good at this compiler you know.also i don''t know whether i installed the tool that you say. if its name is profiler than today i will look for it...
Thanks
Yaskil


Life is beautiful
Life is beautiful
Well actually I forgot that it is pretty difficult to get the MSVC Profiler to work with OpenGL and DirectX. If you want to try it and you are using Pro or Enterprise, go to Project->settings->Link and click on Enable Profiling. And in your Build menu you will see a Profile... option.

The Intel VTune is probably a better choice. It is not freeware but you can download a fully functional 30-day version from their website Here

There are also some Performance libraries there which are free. Of particular interest to the 3D programmer is the Math Kernel Library. It will perform vector math (including dot product and cross product) and matrix math very fast and can optimize using MMX and P4 instructions if available. I was able to cut matrix operation times almost in half using this library.

Seeya
Krippy
This is a really good site if you want to improve your Coding-Optimizing Skills :
http://www.azillionmonkeys.com/qed/optimize.html
Advertisement
thanks everybody, h3idi the site you gave is very informative. Yeah Krippy2k you think same i guess, Vtune is the best choice on that subject

Life is beautiful
Life is beautiful

This topic is closed to new replies.

Advertisement