On 2012-36-22 01:10, bearophile <[email protected]> wrote:

This benchmark shows that if you allocate the class instances on the heap one at a time the total amount of memory used is the same for the various Bar (maybe because of the GC), so that optimization is useful for emplace() only and similar in-place allocations

The current GC always allocates a power of two, with a minimum of 16
bytes. You should see an effect if you make a class that will be above
such a threshold without reordering, and below with.


So is such class field reordering worth an enhancement request in Bugzilla?

Nothing bad can come of it.

--
Simen

Reply via email to