Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
18th April 2004, 04:04 | #1 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Microsoft releases free optimizing C++ compiler
Quote:
After downloading the Windows platform SDK and adjusting the includes/lib environment variables, it seems to work fine at compiling AviSynth plug-ins. (When invoking cl.exe, don't forget the /LD switch to output a DLL, and keep in mind that the switches are case-sensitive.) |
|
18th April 2004, 10:18 | #3 | Link |
Capture, Deinterlace
Join Date: Feb 2002
Location: Right there
Posts: 1,971
|
these are indeed interesting news. you might want to follow this mozillazine thread for a discussion. it seems to be missing midl.exe (i think it can somehow be downloaded).
are they trying o fight mingw/cygwin? |
19th April 2004, 02:50 | #6 | Link | ||
Registered User
Join Date: Sep 2002
Location: France
Posts: 432
|
Re: Microsoft releases free optimizing C++ compiler
Quote:
[edit]From "Optimization.doc": Quote:
Last edited by Kurosu; 19th April 2004 at 03:04. |
||
20th April 2004, 00:46 | #8 | Link | |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
Quote:
(Edit: Oh, right, you might have the non-optimizing version of the compiler. Oops.) Anyhow, it works fine with VC6sp5; you just need to change the include/lib/bin directory settings and maybe adjust some of the compiler flags. Last edited by stickboy; 20th April 2004 at 02:39. |
|
22nd April 2004, 01:08 | #9 | Link | |
Guest
Posts: n/a
|
Quote:
anyway, the version of the vc.net2k3 seems to be lesser than the one in this vctoolkit2k3. and yes it worked fine with the good old msvc6, but i still want to test versus ICL8 ^^; |
|
24th April 2004, 01:58 | #11 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
At a minimum, all you really need is:
Code:
cl.exe /LD myplugin.cpp You probably will want to use some of the optimization flags too (/Ox is probably a good starting point). Last edited by stickboy; 24th April 2004 at 02:01. |
24th April 2004, 07:22 | #13 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
i hope you don't mind my noobish questions here
but i get a bunch of errors when i try to compile the "invert" sample plug-in i copied the whole list (just removed the path to shorten it a bit) maybe someone can tell me what i missed ---------------------------- x:\..\WinNT.h(3874) : error C2146: syntax error : missing ';' before identifier 'ContextRecord' x:\..\WinNT.h(3874) : error C2501: '_EXCEPTION_POINTERS::PCONTEXT' : missing storage-class or type specifiers x:\..\WinNT.h(3874) : error C2501: '_EXCEPTION_POINTERS::ContextRecord' : missing storage-class or type specifiers x:\..\WinNT.h(8260) : error C2065: 'PCONTEXT' : undeclared identifier x:\..\WinNT.h(8261) : error C2146: syntax error : missing ')' before identifier 'ContextRecord' x:\..\WinNT.h(8261) : warning C4229: anachronism used : modifiers on data are ignored x:\..\WinNT.h(8261) : error C2182: 'RtlCaptureContext' : illegal use of type 'void' x:\..\WinNT.h(8261) : error C2491: 'RtlCaptureContext' : definition of dllimport data not allowed x:\..\WinNT.h(8261) : error C2059: syntax error : ')' x:\..\WinBase.h(747) : error C2146: syntax error : missing ';' before identifier 'LPCONTEXT' x:\..\WinBase.h(747) : error C2378: 'PCONTEXT' : redefinition; symbol cannot be overloaded with a typedef x:\..\WinBase.h(747) : error C2501: 'LPCONTEXT' : missing storage-class or type specifiers x:\..\WinBase.h(2904) : error C2061: syntax error : identifier 'LPCONTEXT' x:\..\WinBase.h(2912) : error C2143: syntax error : missing ',' before '*' ---------------------------- |
24th April 2004, 09:52 | #14 | Link |
AviSynth Enthusiast
Join Date: Jul 2002
Location: California, U.S.
Posts: 1,267
|
If you mean the Invert sample code from avisynth.org, then you need to modify the #include lines to:
Code:
#include "windows.h" // add this #include "avisynth.h" (I'll add these corrections to the avisynth.org page right now.) |
25th April 2004, 15:50 | #16 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
txh again, i managed to compile my first usefull plug-in with it
it allows adding integers to the r, g & b value of each pixel so you can for example give the picture a more "cold" look i'm sure such a plug-in already exists, but for educational purpose it was really helpfull i'll post it in an own thread after some improvement and code clean up |
28th April 2004, 14:13 | #17 | Link |
Guest
Posts: n/a
|
I've done a quick benchmark CL vs ICL vs GCC on a MD5 hash bruteforce.
CL 13.10.3052 /Ox /O2 ICL 8.0.040 /O3 /Qipo /Qunroll /QxK GCC 3.3.1 -march=athlon-xp -O3 -ffast-math -malign-double -funroll-loops -pipe -fomit-frame-pointer -msse -mfpmath=sse,387 (if you know better optarg...) ICL : ~8.6millions hashes/sec GCC: ~8.3millions hashes/sec CL : ~6.4millions hashes/sec m$ rulez edit: some errors. Last edited by Sigmatador; 28th April 2004 at 16:57. |
29th April 2004, 06:58 | #18 | Link |
Registered User
Join Date: Mar 2004
Posts: 14
|
-ffast-math is a little unfair.
Here are my CFLAGS: "-O3 -march=athlon-xp -mcpu=athlon-xp -mmmx -m3dnow -msse -fomit-frame-pointer -funroll-loops -fforce-addr -frerun-loop-opt -falign-functions=16 -falign-jumps=16 -falign-loops=16 -falign-labels=1 -finline-functions -pipe -mfpmath=sse,387 -fprefetch-loop-arrays -fmove-all-movables -ftracer -momit-leaf-frame-pointer" If you wonder why I have march, mcpu, mmx, m3dnow and msse and all of the other redundant stuff, that is because some CFLAGS are stripped for some packages under Gentoo. march may be stripped but not mcpu, for example. Edit to note that VS.net uses the same exact compiler. I have personally used it and can tell you that everything there is included. Also, from that page: "Microsoft C/C++ Optimizing Compiler and Linker. These are the same compiler and linker that ship with Visual Studio .NET 2003 Professional!"
__________________
XP box: A7N8X-Dx 1.04, Barton 2600+ @ 180FSB, 512MB Corsair XMS3500, Radeon 9500 Pro 128MB, 2xWD1200JD, Toshiba SD-M1612, Pioneer DVR-A05, Lite-On 24x10x40 CD-RW Gentoo box: K7S5A, Palomino 2100+, 512MB PC133, GF256, WD800JB, Samsung 8x DVD-ROM Last edited by dandragonrage; 29th April 2004 at 07:01. |
3rd May 2004, 20:05 | #19 | Link | |
easily bamboozled user
Join Date: Sep 2002
Location: Atlanta
Posts: 373
|
Re: Re: Microsoft releases free optimizing C++ compiler
Quote:
|
|
3rd May 2004, 22:13 | #20 | Link | |
Registered User
Join Date: Sep 2002
Location: France
Posts: 432
|
Re: Re: Re: Microsoft releases free optimizing C++ compiler
Quote:
But in the way it is written, I think it's false: non-64bits Athlons don't have SSE2. Not all Athlons have SSE (in fact, the float part of SSE, as the MMX part of 3DNow! is much alike iSSE). So, in spite of it being irrelevant to the thread, I'm wondering what they are talking about, though I suspect they meant iSSE code. @Sigmatador I think -O7 is the highest hidden switch for optimization, although I don't know what it does. I'm siding with dandragonrage for the mcpu/march switches. The mmmx/m3dnow/msse switches never gave me any speed increase on a P4 Willamette and and Athlon Barton. In addition, /O2 and /Ox seemed redundant to me for cl.exe. I'd suggest /Ox /Og /Ob2 /Oi /Ot /Oy /GT /G6 (or /G7, depends on your CPU) /Zp16 Last edited by Kurosu; 3rd May 2004 at 22:17. |
|
|
|