Yes. This is pretty subjective as a user, but I'd classify Chrome as slightly better here. They're close enough that it doesn't usually matter unless you're playing JS based games or have a potato for a computer.
> Do they have a different javascript library/engine?
Yes, Chrome uses V8, Firefox uses SpiderMonkey
> Can you change the javascript libraries used by Firefox and Chrome?
No, not easily. It's all open source so technically you could with enough effort. But for example Chrome relies on some shared GC code between Blink and V8 [1]; I expect various feature needs like this would make swapping for SpiderMonkey infeasible.
IIRC Firefox uses their own engine called Spider Monkey. I don’t know of anything outside of Mozilla which uses it. I have a hard time imagining it being faster than V8, but I actually have no idea — will need to go look at some benchmarks.
For example, when you press ctrl+n, chrome instantly creates a new window, then spends the next second or so (depending how old your computer is) painting the UI. On Firefox though it seems like nothing is happening for an entire second, and then the window emerges fully painted. So even tho the total time is about the same, FF feels much less responsive due to this design choice.
I also noticed Firefox spent a much longer time (a fraction of a second, but perceptible, and multiply that by thousands of clicks a day) before it would even (apparently, again -- not sure whats going on inside) begin loading a page, which was frustrating.
I verified this was the case in the web inspector's network performance tab (there was an mysterious delay before the first network request).
All this to say, you might have an add-on delaying network requests to match them against a blacklist, save metadata or whatever the add-on is supposed to be doing.
Some non-Mozilla projects do embed SpiderMonkey, including Bloomberg (since 2001!), MongoDB, CouchDB, and 0 A.D.
https://discourse.mozilla.org/t/survey-where-are-you-embeddi...
Disable javascript and well... the site isn't usable any more for business transactions, but the slowness and CPU load vanishes. The website becomes snappy, highly responsive and easy to browse. The fans spin down and memory usage goes way down.
I've never used Chrome. Does chrome not ever get bogged down by javascript? Do they have a different javascript library/engine? I assume they must. Can you change the javascript libraries used by Firefox and Chrome? Apologies in advance if this is a dumb question.