Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1643253

Re: [PATCH] seq_file: delete small-value optimization

From Alexey Dobriyan <adobriyan@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] seq_file: delete small-value optimization
Date 2017-05-17 12:40 +0200
Message-ID <tI4x4-1Sb-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


> Joe Perches wrote:
> 
> On Tue, 2017-05-16 at 23:42 +0300, Alexey Dobriyan wrote:
> > num_to_str() optimizes printing small integers [0..9], so the same
> > check higher in callchain is unnecessary.
> 
> Doesn't the optimization exists for the frequent use of 0
> in seq output?  
> 
> These seq_put_decimal calls are now slightly more expensive.

That additional CALL instruction is hardly measurable so you're adding
branch to skip branch in the next function.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] seq_file: delete small-value optimization Alexey Dobriyan <adobriyan@gmail.com> - 2017-05-17 12:40 +0200
  Re: [PATCH] seq_file: delete small-value optimization Joe Perches <joe@perches.com> - 2017-05-18 01:30 +0200

csiph-web