From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755182AbbCSMRP (ORCPT ); Thu, 19 Mar 2015 08:17:15 -0400 Received: from mail-la0-f42.google.com ([209.85.215.42]:35077 "EHLO mail-la0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755127AbbCSMRM (ORCPT ); Thu, 19 Mar 2015 08:17:12 -0400 MIME-Version: 1.0 In-Reply-To: <20150317150406.f4ec837c6787dc8f3d1661f2@linux-foundation.org> References: <5500b987.kerYYCYfIffruy3Z%akpm@linux-foundation.org> <87y4n0xxn3.fsf@rasmusvillemoes.dk> <20150314092104.GA1674@p183.telecom.by> <20150317150406.f4ec837c6787dc8f3d1661f2@linux-foundation.org> Date: Thu, 19 Mar 2015 15:17:10 +0300 Message-ID: Subject: Re: + lib-vsprintfc-even-faster-decimal-conversion.patch added to -mm tree From: Alexey Dobriyan To: Andrew Morton Cc: Rasmus Villemoes , Linux Kernel , Peter Zijlstra , Tejun Heo , Denis Vlasenko , KAMEZAWA Hiroyuki Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 18, 2015 at 1:04 AM, Andrew Morton wrote: > On Mon, 16 Mar 2015 18:19:41 +0300 Alexey Dobriyan wrote: > >> Rasmus, I redid benchmarks: > > tl;dr ;) Is this an ack or a nack? New code executes slower for some input on one CPU I've benchmarked, both with -O2 and -Os (Core 2 Duo E6550). The slowdown is in 2-20% range depending on exact number being converted and is reproducible. With -O2 "bad" range is roughly 100-70000, with -Os it is 100-1000 and around 100000. On another CPU (more modern Core i5-something), new code is uniformly faster giving advertised 10-20-35-40% speedups (yay!) The ideal situation is still being a) one system call to push PIDs into userspace in bulk (memcpy directly from pid_ns->pidmap[i]), b) one system call to fetch data in binary to userspace given PID or set of PIDs, without all of this string and /proc overhead. Alexey