Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Watcom was (is?) the best optimizing compiler for 80[3]86, and it included a DOS extender (among other things).


Watcom ceased development 25(?) years ago. DMC still gets updates and code gen improvements.


The most recent commit for OpenWatcom, which is what I originally asked about, was 4 hours ago[1] at time of writing.

[1]: https://github.com/open-watcom/open-watcom-v2/commit/ac10ed3...

(FWIW: I'm in agreement with you that DMC++ is likely superior, I'm more curious about what OpenWatcom's deficiencies in relation to it are, and I reckon there are probably only a few people as familiar and qualified than yourself to comment)


I thought OW was museumed. I guess I was wrong. I have no idea how its code gen compares with DMC++ these days.


When i made a small raytracing benchmark a few years ago[0] OpenWatcom produced better code than DMC (note it was C, not C++), though they were both crushed by Visual C++ 6.

[0] http://runtimeterror.com/tools/raybench/


A few years ago is a long time ago in the compiler biz.


Ok, i tried with the latest versions of both (DMC 8.57 - though the compiler advertises itself as 8.42n - and the latest build from OpenWatcom).

DMC version: Elapsed time = 7.593 seconds

OW2 version: Elapsed time = 6.344 seconds

While i'm using a different CPU than the one from the previous benchmark, the relative results are practically identical (OW version is ~1.195 times faster for the old results and ~1.196 with the new results). VC6 is still faster than both.

FWIW i do not think these different matter that much in practice anyway, if anyone is going to target those old machines nowadays it'd be for retrocoding fun and in those cases if performance is a concern you'd most likely just want to use assembly anyway. IMO as long as a compiler does some basic optimizations to get mostly there it is fine. Some years ago i wrote a small maze rasterizer[0] in C to run on an original IBM PC and i tried to compile it with both Turbo C and OpenWatcom... and there was zero difference in performance since the main render loop was done by generated machine code, so OW's optimizer was optimizing stuff that didn't really need optimizing anyway :-P.

[0] https://i.imgur.com/M3gKlfA.jpg


I haven't updated the binary on the website in a while, the current version is version 9.00 :-)

Thanks for running the tests.

I can email you a current version if you like.


Sure, check my mail in my profile page.


Sent!


> want to use assembly anyway

Well, Doom was written in C, so...


Doom was written mainly in C but the important bits like the span rasterization for the DOS version were written in assembly. The released code was for the Linux version that didn't use assembly so the DOS was only as part of a README file[0]. The sound code was licensed (and thus never released to the public) and most likely also used assembly as that was common at the time.

Quake also used assembly for a few bits (also, like Doom, had C versions for portability).

That is what i meant when i wrote "use assembly", not to write the entire game in assembly (which is why i also gave my maze renderer as an example - pretty much all of it was in C except a tiny part).

[0] https://github.com/id-Software/DOOM/blob/master/linuxdoom-1....


I used Open Watcom 2 in production, together with JWasm and JWlink, everything worked perfectly. Though I remember a couple issues I had and reported mainstream, they fixed it relatively quickly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: