delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/01/12/05:52:23

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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; q=dns; s=default; b=rn87DWp
dcPLnRzdHpGiiCM2i43YVBgZKVE+znNmV627KmF84Lj5eIfkha32yCs0ium+ezR4
9dg0mcd3ikUAmRCtFSTY0hX73PugLOXRu7BeZjO8wC4UeSl/d6yXSq/aIHrIK3Ft
tHI8ZYVux/g3k2nALjKioJ9UgJY+x6GmRtLg=
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:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-type; s=default; bh=YcAO30JKHCU1Y
sP7QpDgiQXcBHY=; b=ophR48L/WgYQTcPCEInx5m0r773f2XoRGGVDoKYn+2s2l
uGV0uPyOwBjT/zBYUphCZzTbD4gbxt/16gCKdZ7zbdX5xLsg4ih7Hd0puR7lt884
gyOzGAjWChsdBZ+8ww8BuysbP5We0K8n3uicJibU+0SF3Qw9bW+nBHBONSlqoU=
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.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=busy, pulls, exclusion, 1x
X-HELO: mail-io0-f195.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=nTW6xZkCQYCcg6cBcf65spDMpKf6jsXDoXUPRaMiOZI=; b=J8ZBCb3t91oMSQ11tLrzfousrsJJujWQLa8eqeioS27Q+8M+YO1SM/TPf+Yuxj3Hzj RB3fwnECEXqEZUrmrs31H1TvM3gc8X0OmtWk/EAkvWUUnQS10a3/78exNbhiwMuRFoZo 7pa7i/F4R4KZRyH5VYqUCMoSWfVwufXEiTy9zoSJmWvyw4MQrQI7utcpxtFZv9WYaFfk +sQ4/HgNgrXqwktnGZavS79qC9PFw2fH1ho0SYH2GnRmpUIYLlY/3QpWDTN3YTOGAZk8 rw/ngwCTC+oIGDI7GBVIW8LvZh8VmJL6icG7ksZYTVNtYql1vJSB/kzPMOGWHJtN961y CTCA==
X-Gm-Message-State: AKGB3mKei+js3behf3mnUdMTxv7pUVReOC0+HTbHxHzEMsHHtrYZyYn+ kR6BLG0ZLTFS0IALJxrI88pEteWtz0KwCuvWgEc=
X-Google-Smtp-Source: ACJfBotqit5JYYo37YuBDZtfRaRfL0zelNmJuAyPn5nUb63qlLq8wutszpzZfwiGFf0o6cKDcEofBLmiUuSPBRJ1sjE=
X-Received: by 10.107.166.18 with SMTP id p18mr25697202ioe.158.1515754328943; Fri, 12 Jan 2018 02:52:08 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <d398824d-32fe-3b3c-23ae-eebc5da1c3af@gmail.com>
References: <CAD8GWsvxzFe0dPnxO-odTY+EG5XOAApLjcOSN5d7vXhtLW0GmQ AT mail DOT gmail DOT com> <d398824d-32fe-3b3c-23ae-eebc5da1c3af AT gmail DOT com>
From: Lee <ler762 AT gmail DOT com>
Date: Fri, 12 Jan 2018 05:52:08 -0500
Message-ID: <CAD8GWssPKHMe9fomrfEJGEm+G83iZeXovPmkNbYBdD0rZ7r45w@mail.gmail.com>
Subject: Re: calloc speed difference
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

On 1/12/18, Marco Atzeri wrote:
> 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've seen windows defender get in the way & slow things down before -
this doesn't look anything like that but how does one know for sure?

when running the cygwin gcc version sysinternals process explorer shows
  system idle process 72.x
  a.exe                      24.9x
  procexp64.exe           1.x
and everything else is < 1%
CPU is an Intel i3 w/ 4 logical processors, so I'm guessing that 25%
cpu busy is one processor 100% busy

It looks roughly the same when running the mingw gcc version .. except
that a.exe shows 24.9x% cpu busy for a much shorter time :)

In any case, I tried turning off windows defender - no change in how
long it takes calloc-test to run  (i already had c:\cygwin in the
exclusion list)


> I have roughly the same for both 32 and 64 cygwin version on W7-64

which flavor of gcc - the cygwin version that builds an executable
that pulls in the posix emulation layer or the mingw version that
builds an executable that runs "native" windows code?

Thanks,
Lee

--
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