- Online Community Forums » Allegro Development » Digital Mars Compiler .... Vroooom!

This thread is locked; no one can reply to it. rss feed Print
Digital Mars Compiler .... Vroooom!
Member #1,943
February 2002

I was searching around for good optimizing compilers, and the name Symantec popped up.
Now, the Symantec compilers are discontinued, but carried on as a free project by the author (I think!) called Digital Mars ( ).
Anyways, I compiled the Allegro DLL with Mingw32. Then downloaded the DM compiler 8.29.
Created an import library from the DLL using the DM implib utility. The include files from the Mingw32 Allegro install worked fine except for the fix class which I deleted to let C++ sources compile (apparently, DM couldn't make sense of the friend keyword...weird!). Finally, I compiled the Allegro demo with the DM setup.
Holy Crap! The optimization I used was maxed out for Windows Apps. The Demo was run in 640x480 with Dirty Rectangles and gave me 200-300 fps in the Mingw32 version, but the DM version was around 300-600 fps!!!!! Specs of my comp are p2-400Mhz, 64MB RAM, SiS 6326 AGP(which I know is an REALLLY old card). Pretty average machine.
So to confirm, I compiled the exzbuf.c example, FPS jumped from 17-18 in Mingw32 to 20-22 in DM. The demos and examples in the OpenPTC library distro also visibly increased in speed.
This compiler seems to kick-ass at global optimization. The actual DLL was GCC based, yet there was noticeable speed increase. SO wouldn't porting Allegro to Digital Mars (as in native compile) be a good thing. I tried with the Cl.exe supplied with DM but it didn't work. Apparently, DM is highly Visual C++ compatible.
Is it possible..has anyone comsidered it?
One way or the other, try this compiler out. Pretty cool for it's price...FREE! ;D
Please somebody port Allegro to Digital Mars!!!!!

Edit : kick donkey ?!?!?!?! ;D..sorry

Member #1,538
September 2001

I don't see anything about its alleged VC++ compatibility. It seems to not be able to use a regular .lib or .dll; instead wanting me to convert them to some other format.

The fact that they need to change actual code to get things like MFC and ATL running should testify to their VC++ compatibility.

Unless they start getting as ANSI C++ as VC++'s compiler, I'll steer clear.

Member #1,943
February 2002

The VC++ compatibility I was talking about was in the language used rather than the ANSI standard. Things like __asm keywords and such. The online manual talks in length about how they try to be as close to VC++ coding standards as possible.
As for the .lib and .dll's not working, the libs need to be converted with the provided COFF2OMF.EXE. The import libraries for the DLL's need to be built with IMPLIB.EXE using the "/system" switch (which adds the "_" prefix to the function names...yea yea kinda dumb::)). With compliant ANSI standards or not, the speed boost is definitely worth checking out.
And I'm really only interested in Allegro running on DM. Otherwise, I only use it to make quick-fix utilities and stuff. The multi-platform support is really helpful on occassion. I'm still loyal to GCC.
If the dodgy cl.exe provided isn't working, can somebody gimme some pointers on what parts of the source I might need to fiddle around with to get it to compile natively with DM? (I'm dumb!...Well, I can try anyway ;D)

Free Market Evangelist
September 2000

I tried DMC on some of my test bench code. It optimizes well, but not as good as MSVC.

I was working on an optimized hash map, so I got it compiled on several compilers to see how well they're able to optimize.

I'll publish the source code with compiler settings later on, once I'm happy with the code base.

For reference, the code produced by gcc 2.95.3-6, MSVC 6, 7 and DMC are within 5% of each other speed wise.
MSVC 7 has the fastest runtime, followed by MSVC 6, then DMC then GCC.

I haven't tried GCC 3.x yet.

Oh, and DMC does't know about the std namespace.

HoopsMan: What switches did you pass to GCC when compiling your program? I hope you used -O2 -fomit-frame-pointer -ffast-math -march=i686 to match MSVC's -Ox -GA6 and DMC's -o -6

- Bob
[ -- All my signature links are 404 -- ]

Member #1,943
February 2002

Bob : Actually, I used '-O3' along with the others you specified. I dont use VC so I don't have a clue of it's optimisation capabilities. But will that still produce a 200% percent speed boost? Seems too much.

The C++ problems are quite apparent, but will that be a problem for Allegro porting..considering it's basically a C library?
Also, the import library trick dosen't work flawlessly... exscn3d.c compiles, but only runs in the 8-bit modes...the 16-bit modes are flawed! Only one line of the scene-rendered cubes is visible.
The compiler is under development continuosly. Eventually, it should support most standard features of the common C/C++ compilers. Doesn't that make it worthy for porting considerations? I know if I want it so bad, I should try it myself ;D. But the thought of diving into files and files of the Allegro code gives me nightmares, especially since I have little knowledge of the platform-specific sections.
Anyway, hope I got some people to atleast notice DM. Thanx for the input, guys! :)

Go to: