Mail Archives: djgpp/2000/02/27/04:36:49
On Sat, 26 Feb 2000, Kalum Somaratna aka Grendel wrote:
> However it is worthwhile to consider the fact that ID software extensively
> used nearptrs for the code for Quake.
id's code was heavily hand-optimized assembly, so it made sense to
squeeze every bit of performance in their case. I doubt that many
DJGPP users would spend so much effort in optimizing their code.
Without that, nearptr is almost of no effect on the speed.
In fact, I challenge you (or anybody else) to come up with a
non-trivial program where there's a significant difference between
farptr and nearptr methods (assuming, of course, that neither variant
does anything stupid to slow it down). I once tried both approaches
on a few programs, and was unable to see any measurable effect.
> Just see how much more nicer the code would be if written with nearptrs
> enabled,
You can hide farptr inside a C++ class, so it will look as nice as
nearptrs.
- Raw text -