[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACVxJT_air0T5+xPd8P=X_AztPpjSYh7vFb=K04utf=gx51Uhw@mail.gmail.com>
Date: Wed, 9 Nov 2016 13:19:02 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Andrei Vagin <avagin@...nvz.org>
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] proc: optimize render_sigset_t()
On Wed, Nov 9, 2016 at 12:37 AM, Andrei Vagin <avagin@...nvz.org> wrote:
> @@ -245,10 +247,13 @@ void render_sigset_t(struct seq_file *m, const char *header,
> if (sigismember(set, i+2)) x |= 2;
> if (sigismember(set, i+3)) x |= 4;
> if (sigismember(set, i+4)) x |= 8;
> - seq_printf(m, "%x", x);
> + buf[j++] = hex_asc[x];
> } while (i >= 4);
>
> - seq_putc(m, '\n');
> + buf[j++] = '\n';
> + buf[j++] = 0;
> +
> + seq_puts(m, buf);
seq_write() should be used to avoid re-reading in strlen().
Anyway I suspect bulk conversion SIMD-style will still be faster.
Alexey
Powered by blists - more mailing lists