The goal is to write a program that returns number of 1 bits in a given number.
Examples
5 -> 2
1254 -> 6
56465 -> 8
Winner
The winning submission is the code which runs in the minimum time. You can assume that normal int value in your language can handle any number (no matter how large) and computes all the valid operators defined for integer in O(1).
If two pieces of code run in the same time the winner is the one implemented in fewer bytes.
Please provide some explanation how your code is computing the result.