Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: C++ compiler
Thread ID: 415740 Message ID: 416143 # Views: 45 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: 3rd Party Software
Date: Monday, December 22, 2014 3:42:43 PM         
   


> >
> > Thanks for that Tony. I expected C++ would optimize all of those down to the first version. I guess VFP is passing lines of code to C++ routines to be executed. I expected a compiler would beat it flat out. Do you suggest that Cheng's compiler is converting the fast FoxPro loop into a slower form of loop?
> >
> > Mike Yearwood
> > Microsoft MVP Visual FoxPro 2008, 2009
> > We have enough youth. We need a fountain of smart!
> > There may be many ways to skin a cat, but there are very few right ways to do it.
>
>
> Hi Mike,
>
> The real question to be asked if what is the Microsoft C++ compiler engine doing or
> not doing as a default to optimize a FOR loop?
>
> Building a simple C++ loop right in Microsoft C++ 10 and compiling it with only Microsoft C++ 10
> as a console application with no overhead at all and the FOR loop is still much slower
> that what is happening in a native VFP For loop running in the IDE or a native p-code compiled
> VFP native EXE.

FYI - there is no difference between the IDE and the EXE as far as p-code compilation. They are both p-code compiled - the FXP or the methods in the class.

There is a huge difference between timings of calling UDFs in the IDE via the OS and calling the UDFs in the EXE without accessing the OS.

>
> Again without extensive analysis of the assembly code it is impossible to state any facts other
> than the obvious, the C++ FOR loop operates slower versus the native VFP FOR loop.
>
> However, the raw calculations comparing the 2 loops is meaningless as the reason to compile
> with a C++ compiler engine is to gleam other types of speed improvements across the entire
> running application not looking at one statement and comparing this only.
>
> One needs to look into such things as the total size of the VFP runtime files as an example with
> combined size of . . . .
>
> around 11 Meg.
>
> Now compiling a VFP Project and including all the runtimes encapsulated inside the one
> EXE, the final C++ executable sizes in at under 3 meg.
>
>
>
> CORRECTION ON THIS POINT. COMPRESSION MAINLY DUE TO compression by UPX.
> MY GOSH WHAT HAPPENED TO THE (runtimes 11 meg) - (total exe size of 3 meg)
> with a clear elimination of 8 MEG?
>
>
> Pete "the IceMan", from the Great White North of Canada.
> www.marathongriffincomputers.com



Mike Yearwood
Microsoft MVP Visual FoxPro 2008, 2009
We have enough youth. We need a fountain of smart!
There may be many ways to skin a cat, but there are very few right ways to do it.

ENTIRE THREAD

C++ compiler Posted by Mike Yearwood @ 12/11/2014 9:47:42 PM
RE: C++ compiler Posted by Tony Vignone @ 12/11/2014 10:18:16 PM
RE: C++ compiler Posted by michael johnson @ 12/12/2014 3:15:14 AM
RE: C++ compiler Posted by Mike Yearwood @ 12/12/2014 4:40:18 PM
RE: C++ compiler Posted by Chuanbing Chen @ 12/12/2014 8:01:24 AM
RE: C++ compiler Posted by Pete Sass @ 12/12/2014 12:41:53 PM
RE: C++ compiler Posted by Pete Sass @ 12/13/2014 5:29:47 PM
RE: C++ compiler Posted by Tony Vignone @ 12/13/2014 8:27:53 PM
RE: C++ compiler Posted by Chuanbing Chen @ 12/14/2014 3:44:09 AM
RE: C++ compiler Posted by Mike Yearwood @ 12/15/2014 4:02:35 PM
RE: C++ compiler Posted by Tony Vignone @ 12/16/2014 2:10:42 PM
RE: C++ compiler Posted by Mike Yearwood @ 12/16/2014 6:00:18 PM
RE: C++ compiler Posted by Tony Vignone @ 12/16/2014 7:37:14 PM
RE: C++ compiler Posted by Pete Sass @ 12/17/2014 3:27:15 AM
RE: C++ compiler Posted by Mike Yearwood @ 12/17/2014 3:50:23 PM
RE: C++ compiler Posted by Pete Sass @ 12/17/2014 6:09:24 PM
RE: C++ compiler Posted by Mike Yearwood @ 12/18/2014 3:22:37 PM
RE: C++ compiler Posted by Pete Sass @ 12/18/2014 4:55:58 PM
RE: C++ compiler Posted by Mike Yearwood @ 12/18/2014 7:16:44 PM
RE: C++ compiler Posted by Pete Sass @ 12/18/2014 7:53:51 PM
RE: C++ compiler Posted by Chuanbing Chen @ 12/19/2014 12:48:30 AM
RE: C++ compiler Posted by Pete Sass @ 12/19/2014 11:57:43 PM
RE: C++ compiler Posted by Mike Gagnon @ 12/20/2014 2:09:13 AM
RE: C++ compiler Posted by Pete Sass @ 12/20/2014 3:18:09 PM
RE: C++ compiler Posted by Vilhelm-Ion Praisach @ 12/20/2014 6:53:41 PM
RE: C++ compiler Posted by Pete Sass @ 12/20/2014 8:25:14 PM
RE: C++ compiler Posted by Vilhelm-Ion Praisach @ 12/20/2014 9:18:10 PM
RE: C++ compiler Posted by Mike Yearwood @ 12/22/2014 3:01:11 PM
RE: C++ compiler Posted by Pete Sass @ 12/22/2014 3:57:28 PM
RE: C++ compiler Posted by Vilhelm-Ion Praisach @ 12/22/2014 5:54:52 PM
RE: C++ compiler Posted by Mike Yearwood @ 12/22/2014 9:38:06 PM
RE: C++ compiler Posted by Chuanbing Chen @ 12/23/2014 1:03:49 AM
RE: C++ compiler Posted by Mike Yearwood @ 12/22/2014 3:42:43 PM