1. A method of storing per-thread, per-instance data, comprising: identifying a unique index value corresponding to a first instance of a class; identifying type parameters based on the identified index value; instantiating a generic holder object based on the identified type parameters, the generic holder object including a thread local field configured to store per-thread data that is local to the first instance; wherein the identifying a unique index value, identifying type parameters, and instantiating a generic holder object are performed by at least one processor; repeating the identifying a unique index value, identifying type parameters, and instantiating a generic holder object, for each of a plurality of instances; determining whether a total number of the instances in the plurality of instances exceeds a predetermined threshold; and allocating data slots to threads for storing per-thread and per-instance data when the total number of instances exceeds the predetermined threshold.