A bit of background: I've been implementing a library for 2 way data binding for my own enjoyment and learning purposes and I've been weeding out performance issues one after another. This is how I noticed the big warning at the top of the MDN documentations for Object.setPrototypeOf which states
Warning: Changing the [[Prototype]] of an object is, by the nature of how modern JavaScript engines optimize property accesses, a very slow operation, in every browser and JavaScript engine. The effects on performance of altering inheritance are subtle and far-flung, and are not limited to simply the time spent in the Object.setPrototypeOf(...) statement, but may extend to any code that has access to any object whose [[Prototype]] has been altered. If you care about performance you should avoid setting the [[Prototype]] of an object. Instead, create a new object with the desired [[Prototype]] using Object.create().
This is very curious to me as to why this would be the case.
PS: for anyone who's curious at why i'm extensively using Object.setPrototypeOf here's the source code for that part of the project https://github.com/muggy8/proxymity/blob/master/src/data-proto.js