Patent ID: 7899856

Claim:
A computer implemented method for determining when to change a representation type of at least one number stored in a memory of a data processing system, the method comprising: receiving an operation in a processor of the data processing system, wherein the operation references a number stored as a class of an object-oriented programming language, and wherein the number is stored as a first representation type; responsive to the operation being biased towards the first representation type, incrementing a first counter; responsive to the operation being biased towards a second representation type, incrementing a second counter, wherein the second representation type is different than the first representation type; calculating a counter reference, wherein the counter reference is equal to a first value of the first counter subtracted from a second value of the second counter; responsive to the counter reference exceeding a threshold number, changing representation of a subsequent number from the first representation type to the second representation type, wherein the subsequent number is generated after the counter reference exceeds the threshold number; and storing the subsequent number.