Uh oh!
There was an error while loading. Please reload this page.
lib: Convert String#indexOf usages to String#includes - #327
Conversation
rvagg
commented
Jan 13, 2015
do we have any perf data on |
chrisdickinson
commented
Jan 13, 2015
It looks like it just calls |
ziyunfei
commented
Jan 13, 2015
From this test, it seems that |
ziyunfei
commented
Jan 13, 2015
|
cjihrig
commented
Jan 13, 2015
Haven't looked into performance, but the code LGTM, FWIW. |
bnoordhuis
commented
Jan 13, 2015
rvagg
commented
Jan 13, 2015
ftr, 👎 from me on this unless perf is improved. Same goes for most transitions to new V8 features in core, I'd expect them to remain unoptimised for some time just like many ES5 features ( |
chrisdickinson
commented
Jan 14, 2015
While I appreciate the intent, I'm -1 on making this sort of change. I don't see any particular benefit in bulk-switching I'll leave this PR open until tomorrow evening to give other collaborators/TC members time to weigh in, but if no one chimes in before then I'll close it. |
jbergstroem
commented
Jan 14, 2015
fwiw, I'm with @rvagg; there's really no benefit of switching until performance at least is equal versus the benefit of readability. |
chrisdickinson
commented
Jan 15, 2015
Closing this – |
littledan
commented
Jul 15, 2015
I updated String.prototype.includes in V8 to be faster using ziyunfei's patch. I think this will come out around M46, but it's also an easy cherry-pick https://codereview.chromium.org/1231673008 . Performance is much closer now. Let me know if you have any other issues with the performance of this function. |
thefourtheye
commented
Jul 15, 2015
@littledan Nice! I left a couple of comments there. Please let me know what you think about them. |
littledan
commented
Aug 11, 2015
@thefourtheye I committed the code as is. I don't think the things you pointed out would be performance issues. But thanks for taking a look. |
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> PR-URL: #315 Backport-PR-URL: #327 CVE-ID: CVE-2022-32215,CVE-2022-32214,CVE-2022-32213
No description provided.