Rapid determination of placement for code and data for optimal access of
the code and data during execution of software applications. An
application that is to be efficiently arranged in a software carrier
medium is instrumented such that the status of whether a particular unit
of code or data has been accessed during a time interval is recorded in a
time-ordered bit sequence for each such unit. A sort routine is used to
sort the order of time-ordered bit sequences within an array of such
sequences. The sort routine invokes a comparison function that operates
upon the temporal information stored in the two time-ordered bit
sequences that are being compared for the routine. The order of the code
and data in the software application is reordered in accordance with the
results of the sort routine.