From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753660AbdEQKdt (ORCPT ); Wed, 17 May 2017 06:33:49 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34867 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbdEQKdp (ORCPT ); Wed, 17 May 2017 06:33:45 -0400 Date: Wed, 17 May 2017 13:33:41 +0300 From: Alexey Dobriyan To: joe@perches.com Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] seq_file: delete small-value optimization Message-ID: <20170517103341.GB28488@avx2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.