Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
CodeImp

Doom WAD files found on Java

Recommended Posts

This is gonna motivate me to rework my (really, really awful) Doom data structure library for Java. What the hell was I thinking using Vectors to hold map data objects? SYNCHRONIZED structures being used in implementations that are most likely single-threaded? Ugh.


Anyway, to contribute to the programming discussion, I concur with the sentiment that most programmers fresh out of college can't code for crap in Java. I've seen Java code written by people that have absolutely no idea how to write Java code that is, performance-wise, computationally viable. While Java implementations are getting better with memory management and virtual machine performance, no Java program will ever perform as well as it should if it is written haphazardly.

Some words to budding Java programmers: Avoid using the "+" operator with String objects. Please. java.lang.StringBuilder is your friend.

Some more words: Sun's JRE is at the point where it is about 1x slower than native code, and kicks the crap out of C in terms of memory de/allocation and stack call performance. It ain't yo momma's programming language anymore. ;)

Share this post


Link to post
Earlier in the thread I said:

Hmm...maybe I'll make a wad library in CL for kicks...

And here's a partial one I wrote in a couple of hours for the hell of it! Yay for lack of documentation and comments.

It only reads in a WAD file and its data; no writing. I didn't pay attention to good style (let alone Lispiness) or performance (no DECLARE statements or such). But it loads Doom2.wad in about 2.5 seconds on a 2.16 Core 2 Duo laptop with a 5400 rpm drive.

Share this post


Link to post
Mista_T said:

Some more words: Sun's JRE is at the point where it is about 1x slower than native code, and kicks the crap out of C in terms of memory de/allocation and stack call performance.

Lies.

Share this post


Link to post
Fredrik said:


Ick. Well, it still fares better than half of the other languages on the list.

Share this post


Link to post
×