In systems accreting well below the Eddington rate, the plasma in the
innermost regions of the disk is collisionless and two-temperature, with the
ions hotter than the electrons. Yet, whether a collisionless
faster-than-Coulomb energy transfer mechanism exists in two-temperature
accretion flows is still an open question. We study the physics of electron
heating during the growth of ion velocity-space instabilities, by means of
multi-dimensional particle-in-cell (PIC) simulations. A large-scale compression
- embedded in a novel form of the PIC equations - continuously amplifies the
field. This constantly drives a pressure anisotropy P_perp > P_parallel, due to
the adiabatic invariance of the particle magnetic moments. We find that, for
ion plasma beta values beta_i ~ 5-30 appropriate for the midplane of
low-luminosity accretion flows, mirror modes dominate if the electron-to-proton
temperature ratio is > 0.2, whereas if it is < 0.2 the ion cyclotron
instability triggers the growth of strong Alfven-like waves, that pitch-angle
scatter the ions to maintain marginal stability. We develop an analytical model
of electron heating during the growth of the ion cyclotron instability, which
we validate with PIC simulations. We find that for cold electrons (beta_e <
m_e/m_i), the electron energy gain is controlled by the magnitude of the
E-cross-B velocity induced by the ion cyclotron waves. This term is independent
of the initial electron temperature, so it provides a solid energy floor even
for electrons starting with extremely low temperatures. On the other hand, the
electron energy gain for beta_e > m_e/m_i - governed by the conservation of the
magnetic moment in the growing fields of the instability - is proportional to
the initial electron temperature. Our results have implications for
two-temperature accretion flows as well as the solar wind and intracluster
plasmas. [abridged]