Hmm, by switching from .substring() to .slice() in a key part of the code, jsdom sped up a real-world benchmark from 43 seconds to 230 ms (187x). @v8js, seems weird?https://github.com/jsdom/jsdom/pull/2419 …
-
-
Agreed - they should have similar performance. I just hope that logic doesn't lead to the conclusion that *both* of them need to be 187x slower ;-)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
Looking forwards to hearing the explanation.
You could think of it as the same high-level issue though: slice and substring are roughly equivalent in functionality, so the expectation is that their performance is similar too. Anything that violates that assumption is surprising, and arguably a bug.