commit | 014a5bc67811136d2721252f49e81fbf6f9de56d | [log] [tgz] |
---|---|---|
author | Jens Johansen <jensj@google.com> | Tue Jun 26 09:31:09 2018 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Tue Jun 26 09:31:09 2018 +0000 |
tree | 3798913732dc3b0f4440f7405f0f20ebb1f274cd | |
parent | d2d47acdceff78baa1c8ca40f9cf88c4ceda8c87 [diff] |
Replace strstr with strncmp looking for path separator Using strstr in a loop is O(n^2) with n being the length of the path, whereas using strncmp is O(n*m) with n being the length of the path and m is the length of the separator (which is always 1). Effectively this turns the quadratic behavior linear. Change-Id: If60d02c33eeca92ca2ff52e0df97d0bb80fe57e0 Reviewed-on: https://dart-review.googlesource.com/62144 Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.