  We calculate the hydrogen and helium-ionizing radiation escaping star-forming
molecular clouds, as a function of the star cluster mass and compactness, using
a set of high-resolution radiation-magneto-hydrodynamic simulations of star
formation in self-gravitating, turbulent molecular clouds. In these
simulations, presented in He, Ricotti and Geen (2019), the formation of
individual massive stars are well resolved, and their UV radiation feedback and
lifetime on the main sequence are modeled self-consistently. We find that the
escape fraction of ionizing radiation from molecular clouds, $\langle f_{\rm
esc}^{\scriptscriptstyle \rm MC}\rangle$, decreases with increasing mass of the
star cluster and with decreasing compactness. Molecular clouds with densities
typically found in the local Universe have negligible $\langle f_{\rm
esc}^{\scriptscriptstyle \rm MC}\rangle$, ranging between $0.5\%$ to $5\%$. Ten
times denser molecular clouds have $\langle f_{\rm esc}^{\scriptscriptstyle \rm
MC}\rangle \approx 10\%-20\%$, while $100\times$ denser clouds, which produce
globular cluster progenitors, have $\langle f_{\rm esc}^{\scriptscriptstyle \rm
MC}\rangle \approx 20\%-60\%$. We find that $\langle f_{\rm
esc}^{\scriptscriptstyle \rm MC}\rangle$ increases with decreasing gas
metallicity, even when ignoring dust extinction, due to stronger radiation
feedback. However, the total number of escaping ionizing photons decreases with
decreasing metallicity because the star formation efficiency is reduced. We
conclude that the sources of reionization at $z>6$ must have been very compact
star clusters forming in molecular clouds about $100\times$ denser than in
today's Universe, which leads to a significant production of old globular
clusters progenitors.
