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