It depends, better for what? The e2140 is a good overclocker with a good motherboard. But in general they both are really outdated cpu's. If you're planning on getting a new processor, you better look into a newer platform.
The e2140 is installed in a hp big box store computer what I'm asking will I gain anything buy swapping out the e2140 with the 840? or should I leave well enough alone?