Would converting the mass fractions directly to mole fractions be faster than re-loading the state?
Calculate just once:
m_i = molarMasses(gas_object)
m_inv = 1./m_i
Then for each point:
y = mass fractions at each point (loaded from solution)
and
x_i = y.*m_inv/(y'*m_inv)
gets you the array of mole fractions.
I just implemented it in Matlab to test, and converting directly takes 2.8e-5 seconds, whereas setting the state and then calling the moleFractions function takes 6.3e-4 seconds (i.e. converting it directly was ~22 times faster).
Still not trivial, but a little faster.
-Steven