我很想知道 .includes() 方法使用什么算法?它是否使用像 rabin karp 这样的模块化哈希?
在不了解更多关于它的方法和速度的情况下,我对使用 .includes() 有点犹豫。我发现的文档在讨论时没有详细说明(例如https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/includes)
javascript hash string-search
hash ×1
javascript ×1
string-search ×1