Anyway, the Digital Mars C/C++ compiler looks impressive.
Anyway, the Digital Mars C/C++ compiler looks impressive.
[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)
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.
Thanks for running the tests.
I can email you a current version if you like.
Well, Doom was written in C, so...
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....
https://github.com/open-watcom/open-watcom-v2/blob/master/li...
It could be made to run on Linux without Wine, there's nothing in particular nailing it to Windows.
Sounds like DMC++ would need porting to run on Linux though.
Also none of those are "not free enough" (FSF claims so but it doesn't seem to explain why) and they're really about the license itself, not how it applies in practice to OpenWatcom.
[0] https://opensource.org/licenses/Watcom-1.0
[1] https://www.gnu.org/licenses/license-list.html#Watcom
[2] https://lists.debian.org/debian-legal/2006/07/msg00014.html
Sagan said..."extraordinary claims require extraordinary evidence".
I don't think he is the boasting type, even though he has enough reasons to boast… being the only person that ever wrote a C++ compiler by himself and all.
The reason is pretty simple - all the support code would exceed 640K. You wouldn't get past a demo program.
Templates work, but you have to be pretty cautious in avoiding template bloat. Probably better off just avoiding them.