E=m*V^2. So rail guns will eventually win.
I may be wrong, but I believe that would only apply to kinetic energy. Directed energy weapons don’t depend upon kinetic energy, but rather thermal and electromagnetic effects. They also don’t rely upon projectiles, so no mass involved, the “m” in your equation..