octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow]


From: Paul Kienzle
Subject: Re: [Fwd: [Bug c++/14563] octave built under Cygwin very slow]
Date: Sun, 28 Mar 2004 17:27:57 -0500

I'm putting my executable bundle on:

        http://myfilelocker.comcast.net/pkienzle/new.tar.gz

It is easier to compare times if they are on the same machine.

There are two subdirectories: new 32 and 33, each with their
own cygwin1.dll.

From msys, so long as cygwin is not running, you should
be able to say:

        time 32/cygwin32
        time 32/Ccygwin32
        time 33/cygwin331
        time 33/Ccygwin331
        time 32/mingw32.exe
        time 32/Cmingw32.exe
        time 33/mingw333.exe
        time 33/Cmingw333.exe
        time 33/mingw323.exe

I tried alloc.c with lcc, and it was slower than mingw32 so
I didn't bother recording the time.

Paul Kienzle
address@hidden

On Mar 28, 2004, at 4:18 PM, Paul Thomas wrote:

Well, we seem to have got rid of the smoked fish (sorry, red herring) and now have a smoking howitzer......

Paul,

It strikes me that not only is new/delete slow for cygwin331 but that malloc/delete must also take most of the execution time for the octave tests. These seem to be totally excluded from the profiling.

I have added the Intel, Visual C and gcc331 times for Windows XP on an Athlon 1700

Paul T

PS I would have added the exit but I was going to bash ctrl-c is anything went wrong with the allocation.

Paul Kienzle wrote:

Tests of malloc and new [] for cygwin and mingw 3.2 and 3.3 and linux gcc 3.3.
Someone please fill in numbers for 'native' windows compilers, such as
visual C and Intel.

=== Times, running under msys on a Windows 2000 PII-300 system

System        real        user        sys
mingw333    17.936    0.030    0.040
cygwin331    72.394    0.020    0.060
Cmingw333    12.277    0.010    0.060
Ccygwin331    24.355    0.030    0.050

System        real        user        sys
mingw323    18.837    0.020    0.040
mingw32        14.160    0.010    0.060
cygwin32        15.933    0.020    0.050
Cmingw32    12.668    0.030    0.040
Ccygwin32    14.410    0.010    0.080

Paul Thomas adds...

  === Elapsed times running under Windows XP on an Athlon 1700

System execution time (octave> tic;system('./malloctest.exe');toc
 intel                   2.19
 VC                    2.17
 cygwin331        19.86
 Cintel                2.58
 CVC                 2.37
 Ccygwin331     4.34

=== Times, running under bash on a Debian PII-400 system

System        real        user        sys
linux332         4.808    4.800    0.010
Clinux332     3.162    3.160    0.000

=== Versions

mingw32        3.2 (mingw special 20020817-1)
mingw323    3.2.3 (mingw special 20030504-1)
mingw333    3.3.3 (mingw special)
cygwin32        3.2 (20020927 prerelease), linked against stdc++.dll
cygwin331    3.3.1-3 (cygming special)
linux332        3.3.2 20030908 (Debian prerelease)

=== C++ Compiled with g++ -O2.  Run under msys.
// Author Paul Thomas
#include <iostream>
using namespace std;

int main()
{
  for (int iloop = 0; iloop < 10000000; iloop++)
  {
    double *myarray;
    if ((myarray = new double [1]) == NULL)
cout << "unable to allocate my array at iloop=" << iloop << endl;
    delete [] myarray;
  }
  cout << "done looping" << endl;
  return 0;
}

=== C Compiled with gcc -O2.  Run under msys.
/* modified from C++ by Paul Kienzle */
#include <stdio.h>
int main()
{
  int iloop;
  for (iloop = 0; iloop < 10000000; iloop++)
  {
    double *myarray = (double *)malloc(sizeof(double));
    if (myarray== NULL) { printf("alloc failed\n"); exit(1); }
    else free (myarray);
  }
  return 0;
}







reply via email to

[Prev in Thread] Current Thread [Next in Thread]