about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorBarosl LEE <github@barosl.com>2015-01-21 02:16:50 +0900
committerBarosl LEE <github@barosl.com>2015-01-21 02:16:50 +0900
commitc5fd58d5125e071e9c49aa469383c302ea3d1fe3 (patch)
tree14a689a982f7c115c0622fc13a799a913bfd7d0b /src/rustllvm/RustWrapper.cpp
parenta79f1921a977595a0321dee96ba08b17b52850ae (diff)
parent21f4483de3a78c843db2a6de49b14d4777b83918 (diff)
downloadrust-c5fd58d5125e071e9c49aa469383c302ea3d1fe3.tar.gz
rust-c5fd58d5125e071e9c49aa469383c302ea3d1fe3.zip
Rollup merge of #21377 - iKevinY:speedy-tidy, r=huonw
`x in y` is more Pythonic than `y.find(x) != -1`. I believe it runs quite a bit faster as well (though it's probably not a bottleneck of the Travis builds):

```bash
$ python -m timeit '"abc".find("a") != -1'
1000000 loops, best of 3: 0.218 usec per loop
$ python -m timeit '"a" in "abc"'
10000000 loops, best of 3: 0.0343 usec per loop
```
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions