Status: Untriaged
Owner: ----

New issue 4384 by [email protected]: String.prototype.startsWith is slow
https://code.google.com/p/v8/issues/detail?id=4384

Version: 3.31.74.1
OS: Ubuntu 14.04, Mac OS X 10.10.8
Architecture: x64

String.prototype.startsWith was introduced at 0627d43 as harmony flagged feature, and unflagged at af04fdf. Its implementation uses indexOf, and it didn't changed since 0627d43.

So I assume it happens every version after string harmony feature was introduced, including latest version, and every OS and every architecture.

This is simple startsWith benchmark code, which uses Node.js/io.js and 'benchmark' package from npm, and results from my machines:
https://gist.github.com/Snack-X/1e14bad01071dbf9ba1b

Included results are from OS X and Ubuntu, and it shows String.prototype.startsWith is slower than other methods, for example substring and slice. Especially, it is hundreds times slower than substring and slice when string becomes very long.


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to