Skip to main content
GameDev.net gamedev.net
🔒 Locked

General bottlenecks

Started by walkingcarcass Apr 22, 2003 at 4:11 AM 2 replies 350+ views
Original Post
walkingcarcass
walkingcarcass
Anyone who''s done serious optimising will probably have examined where the greatest amount of time is spent in certain functions. I am wondering what the overall trend in overhead is. Apart from your own special algorithms for this and that (AI and the like), where do you find the most execution time is "wasted" eg state changes, memory allocation etc... ******** A Problem Worthy of Attack Proves It''s Worth by Fighting Back
spraff.net: don't laugh, I'm still just starting...
S1CA
S1CA
Depends on which part of the app you''re talking about, but commonly (in CPU terms):

- page faults (i.e. addresses not used for a while get paged out by the virtual memory system, paging them back in again [from HD] can take between 1 and say 100ms!).

- cache misses (i.e. accessing structures in a bad order, structures which don''t fit in the cache etc). [IIRC the ''real'' total cost of a read of a DWORD of data not in the cache is something like 38 clocks].

essentially patterns of memory access do have a big effect on performance. Key term "Locality of reference".

I''d actually advise:

1. Getting hold of the Intel Architecture Optimization Guide from developer.intel.com

2. Getting a profiler such as VTune and seeing where the bottlenecks in YOUR app are. I''ve mentioned two bottlenecks, but the way YOU program might not promote those bottlenecks but might lead to others that my methods don''t. i.e. Your Mileage WILL Vary.


BTW: (in a game situation) memory allocation and release should never be done "in frame" so really shouldn''t account for ANY performance hit IMO.



In an app using 3D graphics hardware the bottleneck really does depend on what your scenes consist of.

Fill rate limited is common, T&L rate and triangle rate is less common (usually really data upload cost).




--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
walkingcarcass
walkingcarcass
I got the architecture guides etc already, I''m just curious how other people''s problems compare.

********


A Problem Worthy of Attack
Proves It''s Worth by Fighting Back
spraff.net: don't laugh, I'm still just starting...
Ready4Dis
Ready4Dis
I''m fillrate limited in my application... something to do with my gf 256 I think . Most common bottleneck is using the wrong algorythm for the job. If you optomize an inefficient algorythm to death, it''s still not going to be as fast as an efficient algorythm. Like he recomended, download something like vtune and check where YOUR bottlenecks are. There isn''t just a single general spot for bottle necks, although, I do find EVERYTHING is just to slow . My memory sub-system isn''t fast enough, my agp transfer rate is to slow, and my cpu is pretty fast, but it''s just not fast enough.. ever!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.