Archived

This topic is now archived and is closed to further replies.

Yaskil

Fast Codes

Recommended Posts

Yaskil    122
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

Share this post


Link to post
Share on other sites
Krippy2k    134
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

Share this post


Link to post
Share on other sites
gph-gw    122
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.

Share this post


Link to post
Share on other sites
Yaskil    122
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

Share this post


Link to post
Share on other sites
Krippy2k    134
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

Share this post


Link to post
Share on other sites
h3idi    157
This is a really good site if you want to improve your Coding-Optimizing Skills :
http://www.azillionmonkeys.com/qed/optimize.html

Share this post


Link to post
Share on other sites
Yaskil    122
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

Share this post


Link to post
Share on other sites