delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/01/12/04:07:33

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=u2DeJ/TkGsYDVOce
Y8/G149HdYcz4i4wT6EFX6pvikeUT5T/w4KvsGuGWcLZBGRA6panLQwFVvS9YUKz
R7Lnw9uiT79iX1GgnjLTezSw0XB9uV7cm7wpum/2nt6Vvns55Nq8NDmsbIKjxisL
tfUQaRTJnpLY6KHTGPKl3q6FRbI=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=HxqPwGTsETR5+qfd5eQ3p9
Sw0hg=; b=wGu/dirB2Lwj2+asPDDxE4Js0Pwnmm2DIxrK1J+UBRNYK3nsbH4e6u
ZR3LILyX8rQz2i0qce6kWy3JE8CO0B1l6UDtlZ3I1vj1lk/AAUSADf77nEQLg2sF
kVsb72o/WoVEHPyJpeXpvjHNQiFrUa0zjxFUx8oH7UDszk2Ffn6q0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
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)
Subject: Re: calloc speed difference
To: cygwin AT cygwin DOT com
References: <CAD8GWsvxzFe0dPnxO-odTY+EG5XOAApLjcOSN5d7vXhtLW0GmQ AT mail DOT gmail DOT com>
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Message-ID: <d398824d-32fe-3b3c-23ae-eebc5da1c3af@gmail.com>
Date: Fri, 12 Jan 2018 10:06:54 +0100
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: <CAD8GWsvxzFe0dPnxO-odTY+EG5XOAApLjcOSN5d7vXhtLW0GmQ@mail.gmail.com>
X-IsSubscribed: yes

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 <stdio.h>
> #include <stdlib.h>
> #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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019