From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5AEC11F461 for ; Wed, 28 Aug 2019 18:16:42 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=hrfpe hFrSK/7I7qaHWO2/ImVbtBBagQa5Z/zVZzLmulm0KNMJKe4jVSwqlDG0EcCCT9xp aEY0ID1nxtb+AK6ih7em7BJ0ef+iWtntjmwrABkPenhk/cMRO/SAeGtnOXyggq2u RgFgdwI1MJJJddpnj1//oW7VMHY0l49COyBTD4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=WK/Q0d0MAnC gKWphdTm5CxqCASo=; b=qsDe1nqUcRKlGsETnq149BJOz3ykQBSFY9cIwsQuwPp 5E6P9mvqouwZxyvhsSNNaZLOZAONQFK3hyQ1CK1NEmfryYRqdm1mynYq0Us3UVjh sPOmaAaQbMzQNcWFuYOytOGwekG2CkkaRPGtalA3EB8cT9REU343A0zcsn2HGQrg = Received: (qmail 16938 invoked by alias); 28 Aug 2019 18:16:39 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 16348 invoked by uid 89); 28 Aug 2019 18:16:38 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: Zack Weinberg Cc: libc-alpha@sourceware.org, Joseph Myers , Lukasz Majewski , Alistair Francis , Stepan Golosunov , Arnd Bergmann , Adhemerval Zanella , Samuel Thibault Subject: Re: [PATCH v2 05/10] Use clock_gettime to implement time. References: <20190828153236.18229-1-zackw@panix.com> <20190828153236.18229-6-zackw@panix.com> Date: Wed, 28 Aug 2019 20:16:31 +0200 In-Reply-To: <20190828153236.18229-6-zackw@panix.com> (Zack Weinberg's message of "Wed, 28 Aug 2019 11:32:31 -0400") Message-ID: <87muftb1fk.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * Zack Weinberg: > Most ports were using gettimeofday to implement time, or they were > making a direct (v)syscall. Unconditionally switch to using > clock_gettime instead. All sysdeps implementations of time are > removed. I'm sorry, but this is clearly not advisable because clock_gettime is almost an order of magnitude slower than time. A synthetic benchmark with back-to-back time calls takes 2.3 ns on a Xeon Gold 6126 CPU, but 17.9 ns on your branch. Given that time has no stringent accuracy requirements, this shouldn't come as a surprise. Thanks, Florian