On Tue, May 12 2015, "George Spelvin" <[email protected]> wrote:
> Make the endianness permutation table do double duty by having it > list not source offsets, but destination offsets. Thus, it both puts > the bytes in the right order and skips the hyphens. > > This further shrinks the code from 256 to 214 bytes. Eliminating > erratic branches probably helps speed, too. > > Signed-off-by: George Spelvin <[email protected]> > --- >> These might be better with a little comment/explanation >> of the values as output offsets for each index. > > Like this? I had thought about it, and had decied not to change the > existing lacomic code style, as it didn't seem any harder to understand > than the original. But I'm happy to add comments. > With or without comments and the microscopic nit below: Acked-by: Rasmus Villemoes <[email protected]> You may want/need to include Andrew Morton in the cc-list to get these picked up. > > lib/vsprintf.c | 32 ++++++++++++++------------------ > 1 file changed, 14 insertions(+), 18 deletions(-) > > + /* Insert the fixed punctuation */ > + uuid[23] = uuid[18] = uuid[13] = uuid[8] = '-'; > + uuid[36] = 0; I think '\0' is more common. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

