Enabled jemalloc. by asajeffrey · Pull Request #61 · servo/mozjs
@tschneidereit OK, here's a theory... The Array [] test is running:
for ( var j = 0; j < i * 10; j++ )
ret = new Array(i);
Each array is being initialized at a different size, so jemalloc is going to a different area of memory for each of them (to avoid fragmentation). Malloc doesn't try to avoid fragmentation, so is just allocating memory sequentially. This gives malloc better cache performance than jemalloc.
Note that the other tests initialize an empty array with no backing store.
This is just a theory, but it would explain the results.