Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
An alternate way to do has-substr
- starts-with for checking strings at the start of a string - substr-eq-at for checking strings anywhere in a string Both use nqp::eqat underneath. The Str:D: candidates are about 2x as fast as the Cool:D: candidates. Since these methods are really only intended for hot code paths (because the same functionality can be achieved by just doing .substr eq "foo", but about 4x times as slow), it seems valid to keep the separate candidates around. This patch does *not* remove the has-substr implementation. So either can be reverted without touching anything else.
- Loading branch information