Re: [PATCH] fs: seq_file: optimize seq_pad()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 10, 2014 at 5:21 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Sep 10, 2014 at 01:20:19PM +0400, Dmitry Voytik wrote:
>> Use seq_putc() instead of seq_printf() in seq_pad() because the
>> former is faster.
>
> _Solitary_ seq_putc() is certainly going to be faster, but that loop...
> Do you have profiling results, or is it just an apriori "printf must
> be sloooowwww"?

My fail, sorry. The commit message is little bit wrong. I meant that simple
looping of seq_putc() is faster than seq_printf(). I haven't done profilings.
I just realized that seq_printf() is more complex than simple loop
with seq_putc()
(no need to decode format string as in vsnprintf(), etc).
If I resend the patch with the following commit message:

Use a simple loop with seq_putc() instead of seq_printf() in seq_pad() as
this approach is faster due to less complexity in terms of machine cycles.

Would be it Okay?
Thank you for reviewing.

-- 
Best Regards,
Dmitry Voytik.
voytikd@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux