commit | 98dd542ffcd3424b1da58bd273c0c1ff5b8c8960 | [log] [tgz] |
---|---|---|
author | Glenn Kasten <gkasten@google.com> | Thu Dec 15 14:38:29 2011 -0800 |
committer | Glenn Kasten <gkasten@google.com> | Thu Jan 05 15:31:19 2012 -0800 |
tree | e3bc2deb104359535cb71f9f728cfb197298cda6 | |
parent | a2a0a5d7d56baa831870f4bf2a0d942a477d92ef [diff] |
Replace loop by __builtin_ctz Using the builtin is faster on some platforms, for example on ARM it's 19 instructions instead of 13, and is O(1) instead of O(n). Of course, track creation is an inherently slow operation, so this doesn't matter much now. But if we add support for virtual tracks, then physical tracks will be allocated/freed more frequently. Also just on principle ... Change-Id: I3f590934092bd7a1869cbedbc7357928aa5cc8ff