Nitromethane engines are less than 50% efficient and batteries are already about 10% as dense as nitromethane, so it's less than a factor of 5 difference.
For drag, the limit is more likely to be power density rather than energy density (same reason why more energy dense gasoline isn't used in top-fuel; the limiting power factor for a typical ICE is the amount of air you can get in the cylinder and you get about double the power with nitromethane vs gasoline for a fixed amount of oxygen).
[edit]
The power you can get with nitromethane is only double if you run stochiometric; since it is partially self-oxidizing, running richer lets you get even more power (sources seem to indicate 4x). Of course running rich lowers the efficiency even more.
For drag, the limit is more likely to be power density rather than energy density (same reason why more energy dense gasoline isn't used in top-fuel; the limiting power factor for a typical ICE is the amount of air you can get in the cylinder and you get about double the power with nitromethane vs gasoline for a fixed amount of oxygen).
[edit]
The power you can get with nitromethane is only double if you run stochiometric; since it is partially self-oxidizing, running richer lets you get even more power (sources seem to indicate 4x). Of course running rich lowers the efficiency even more.