From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47908 invoked by alias); 12 Jan 2018 09:07:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 47691 invoked by uid 89); 12 Jan 2018 09:07:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HX-Received:10.80.241.215, H*u:6.1, H*UA:6.1 X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Jan 2018 09:06:59 +0000 Received: by mail-wm0-f48.google.com with SMTP id r78so10422149wme.0 for ; Fri, 12 Jan 2018 01:06:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fN8Wi1Etijss5Eo91KTj7fTJeUrzVpQAl3yD0sW9mN4=; b=N9e3o9uONfLKHglzkrTFFyim5iot+5hdQCbKGBajWuDQEUjVv6Mm/GhvP5o5n62LH9 aPm29NiIDOmDZp5bP9eIwtNF0s44HaCUnmrzWvy5pDjRHz1yX3qgug/8ms62e9qKpZ/L E9zWnZJV1gvl9sHLk8Z9cRfn81IoVH3qvWDpxHo7zsCyc1TNF1SdhJBQA9QWpHkBLCDu 7mMRaA+pGI6tzMnuPlSXBx58PyyrJTv7HKAupyMYi3UUkaiunooEYif6aiD8ze0pZ1jR L2XU1+zi5vN/TvSEqE9Ro3Q/qNdsMTOy9tcT2EZb0zK2sCDBO8sbW9g1O32v0rPj+RRV zW8g== X-Gm-Message-State: AKwxytfYEFAwDzU9Lyhg+IaMOyO477gfm5oSxeMtbkX1IQ688qfFZh32 +YOZSSaPWEFcjRI9/CroWLSaCA== X-Google-Smtp-Source: ACJfBovo1IFt8+HqshCC0ddsk+7kAKjm8WlkUXWvqwFwQM9AJ5E6qcQJt8XAmapX+3JJfpPm1Yj9mg== X-Received: by 10.80.241.215 with SMTP id y23mr6685742edl.204.1515748017229; Fri, 12 Jan 2018 01:06:57 -0800 (PST) Received: from [172.21.192.116] ([178.15.39.162]) by smtp.googlemail.com with ESMTPSA id d3sm12507273edc.15.2018.01.12.01.06.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Jan 2018 01:06:56 -0800 (PST) Subject: Re: calloc speed difference To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: Date: Fri, 12 Jan 2018 09:07:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00107.txt.bz2 On 12/01/2018 08:19, Lee wrote: > Why is the cygwin gcc calloc so much slower than the > i686-w64-mingw32-gcc calloc? > 1:12 vs 0:11 > > $cat calloc-test.c > #include > #include > #define ALLOCATION_SIZE (100 * 1024 * 1024) > int main (int argc, char *argv[]) { > for (int i = 0; i < 10000; i++) { > void *temp = calloc(ALLOCATION_SIZE, 1); > if ( temp == NULL ) { > printf("drat! calloc returned NULL\n"); > return 1; > } > free(temp); > } > return 0; > } > > $gcc calloc-test.c > $time ./a > > real 1m12.459s > user 0m0.640s > sys 1m11.750s it seems a local problem, maybe BLODA? I have roughly the same for both 32 and 64 cygwin version on W7-64 $ time ./calloc-tests real 0m8.346s user 0m0.904s sys 0m7.175s -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple