Ad
  • Custom User Avatar

    Mmm, the bitwise approach should perform much much more quickly than the various non-bitwise solutions proposed, right? String parsing is always going to be slower than bitshifting and masking. Granted it adds complexity, but I wouldn't say none is needed - if you're trying to jam as many of these transforms as possible into a cycle the bitmath will pay dividends.

    I wonder if it would be possible to define kata using performance constraints. Obviously you couldn't do it in an absolute sense, as different machines would perform differently, but perhaps providing a reference implementation (say, using string parsing) and requiring that any solutions perform better by a factor of X?

    Putting in that kind of constraint would not only encourage more efficient solutions but would also justify a higher kyu by touching on meaningful performance metrics as a requirement rather than a hypothetical.