00:41
<ljharb>
oh. well then yeah fair, i'm sure that's super rare :-)
00:42
<ljharb>
it's just very unfortunate that you can basically slow down any large-enough codebase for the entire life of the program if you sneak a ;[][Symbol.isConcatSpreadable] = false; in there
00:50
<bakkot>
there's lots of other things with similar effect
00:53
<bakkot>
https://chromium.googlesource.com/v8/v8.git/+/HEAD/src/execution/protectors.h
00:54
<bakkot>
not as many as I recalled actually
00:54
<bakkot>
but yeah still a handful
00:56
<ljharb>
do other engines have similar global, permanent perf cliffs?
00:59
<bakkot>
I know JSC has watchpoints, which amount to the same thing, yes
00:59
<bakkot>
I suspect SpiderMonkey also does but don't know offhand; shu might remember
01:00
<bakkot>
It's kind of inevitable if you want to make a performant engine - the language has lots of stupid dynamism and it's impossible to optimize in the face of full dynamism, so you have to know if certain things are intact
01:01
<bakkot>
and while I guess you could in principle check to see if something is mutated and then restored, that's expensive and rare so there's not that much reason to bother
01:04
<bakkot>
JSC also famously has the "have a bad time" watchpoint, which makes many things slow https://github.com/WebKit/WebKit/blob/eb65814e9baa483a2fb87b099ab1ba905b9389c9/Source/JavaScriptCore/runtime/JSGlobalObject.cpp#L2249