Relative to what? I don't know if there have been papers on the thermodynamics of it, but it's a complex process that depends on a bunch of factors: the size of the organism, the size of the genome, the size of the new protein, the level of expression, etc.
Empirically, everyone who has done lab work with bacteria knows that they'll quickly (i.e. within a few generations) kick out plasmids unless there's selective pressure to keep them. Genes are more likely to stick around than plasmids (since they're directly integrated in the organism's genome, and there's less of an energetic cost to accumulating DNA sequence), but stable genome transformation is slow/unlikely, and bacteria will still find a way to disable un-needed genes in a relatively short period of evolutionary time.
Empirically, everyone who has done lab work with bacteria knows that they'll quickly (i.e. within a few generations) kick out plasmids unless there's selective pressure to keep them. Genes are more likely to stick around than plasmids (since they're directly integrated in the organism's genome, and there's less of an energetic cost to accumulating DNA sequence), but stable genome transformation is slow/unlikely, and bacteria will still find a way to disable un-needed genes in a relatively short period of evolutionary time.