Re: [hatari-devel] dsp profiler mods

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Another useful thing I was able to do with the DSP profiler is identify the incidence rate for variable references. You can find all references to a given symbol, and sum the total number of hits for each reference - which offers a clue to the cost of the variable access over time and helps guide where the variable should live. This can be done with any script but it was easy enough to do in Excel also using a search field, a boolean find column and a sum column.

This works for optimising specific variables but also for locating variables which don't need fast addressing and can release their space for something in greater need of optimisation (when writing a lot of code, it's common to use habits which can result in inappropriate optimisation of some things without realising).



e.g. for direct-referenced variables....

The most often direct-referenced variables should be located at addresses 0-63, with short addressing, occupying the same word as the opcode.

Other frequently direct-referenced variables get moved to the address range 0-511 if they are accessed by code in external memory (so they can't cause an EXT: penalty), or 512+ if they are only ever referenced by code within internal P memory (since these won't cause a penalty anyway, and best leave the internal memory for other things).

D




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/