1. A computer-implemented method for determining affinity estimation between fields of a record in a computer program, the method comprising: obtaining a trace associated with an execution of the computer program by a computer having a plurality of processing entities, the trace comprising at least a first indication and a second indication, the first indication is associated with a first access to a first field of the record, the second indication is associated with a second access to a second field of the record, the first access precedes the second access; determining a first and a second processing entities of the plurality of processing entities associated with the first and the second indications; determining the affinity estimation based on a change in expected performance due to associating the first and second fields in a single cache line in view of performing the first access by the first processing entity and the second access by the second access entity; modifying a data layout of the computer program based on the affinity estimation.