  In cosmologies with an early matter-dominated era (EMDE) prior to Big Bang
nucleosynthesis, the boosted growth of small-scale matter perturbations during
the EMDE leads to microhalo formation long before halos would otherwise begin
to form. For a range of models, halos can even form during the EMDE itself.
These halos would dissipate at the end of the EMDE, releasing their
gravitationally heated dark matter and thereby imprinting a free-streaming
cut-off on the matter power spectrum. We conduct the first cosmological
$N$-body simulations of the formation and evaporation of halos during and after
an EMDE. We show that in these scenarios, the free-streaming cut-off after the
EMDE can be predicted accurately from the linear matter power spectrum.
Although the free streaming can erase much of the EMDE-driven boost to density
perturbations, we use our findings to show that the (re-)formation of halos
after the EMDE nevertheless proceeds before redshift $\sim 1000$. Early-forming
microhalos are a key observational signature of an EMDE, and our prescription
for the impact of gravitational heating will allow studies of the observational
status and prospects of EMDE scenarios to cover a much wider range of
parameters.
