Computer-implemented method comprising: Receiving (210) a sequence of previous
program counter addresses (110) of a
computer program and corresponding
delta values, each
delta value defining a difference between a respective first
memory address (122) and a respective second
memory address (124), the first
memory address being a memory address from which data was retrieved when an instruction pointed to by the corresponding
program counter address (110) was executed, and the second memory address (124) being a memory address from which data was retrieved before data was retrieved from the first memory address (122); generating (220) an input representation based on the sequence of
program counter addresses (110) and their corresponding
delta values; Providing (230) the input representation as input to a
recurrent neural network (300); Receiving (240) from the
recurrent neural network (300) an output defining a probability distribution of future delta values, each probability in the distribution representing a probability that execution of a future instruction of the
computer program will cause data to be retrieved from a future memory address equal to (i) a respective first memory address (122) from which data was retrieved when an instruction pointed to by a last program counter address (110) in the sequence executed, and (ii) the future delta value corresponding to the probability; Determining that one or more probabilities in the distribution satisfy a threshold criterion; and automatically inserting one or more retrieval instructions into the
computer program, wherein execution of the one or more fetch instructions causes data to be fetched from the one or more future memory addresses associated with the one or more probabilities satisfying the criterion, and wherein the one or more fetch instructions are inserted into the computer program before future instructions of the computer program.