Ad
  • Default User Avatar

    My testing does not support this assertation.
    It is usually a little faster, but sometimes slower.

    (I did not find a case where it was more than a few % faster.)

  • Default User Avatar
  • Custom User Avatar

    That's right, it's supported by most modern compilers like gcc and clang but not vc++ for example.

  • Custom User Avatar

    Sorry but this code is all bad. First of all, you are not checking if the input string contains character lesser than 'a', which can easily happen if the string would be corrupted. Then, you are making malloc to int* type-pointer, and whats actually worst, you are mallocing only 5 bytes, in case of longer inputs, 5 bytes are not enough to hold errors + slash + string len, so you will actually write final string without NULL termination.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution