commit | 71339117638469372f703332d8b969382b12c49b | [log] [tgz] |
---|---|---|
author | Jens Axboe <axboe@kernel.dk> | Fri Dec 21 22:54:56 2012 +0100 |
committer | Jens Axboe <axboe@kernel.dk> | Fri Dec 21 22:54:56 2012 +0100 |
tree | ab8c0a5e51204dfb704f47f9b7c3d2f152029409 | |
parent | 4e59017dd2a031f2b7fbe2931d3c602735b6cfd6 [diff] |
clock: turn expensive division into multiply + cheap division On x86-64, dividing by a variable turns into a hugely expensive divq. It's much cheaper to invert the division. Instead of dividing clocks by clocks-per-usec, multiply by a 16M/clocks-per-usec constant instead. Signed-off-by: Jens Axboe <axboe@kernel.dk>