Just because it's fun to talk about, I thought I'd bring up the idea of client optimizations. We've got a host of new changes on the horizon for the D2OL client. Optimization isn't on the list this time, but it never hearts to kick the idea around.
My understanding of the D2OL code is limited. I know there is some Java in there as well as some C code. If memory serves, the GUI is written in Java (D2OL includes its own JRE as I discovered during my attempt to find the best JRE for the client). There really isn't much to be gained by optimizing this, as you shouldn't be looking at it in the first place!
The actual computation engine, or the Agent, is written in C. This is the part that interests me. I would appreciate it if someone would either confirm my understanding of the D2OL code or set me straight.
If my above description of the client is wrong, then everything I'm about to say is irrelevent. Assuming for a minute that I've got it right, I'll proceed. There are two approaches for optimizing the client. The first is a recompile of the source using an optimized compiler specific to the CPU core, similar to the POV recompiles that make such a huge impact on performance. I'm not sure how much these optimized compilers cost or what hurdles this approach has. The obvious benefit is that the code doesn't need to be rewritten. A recompile can wring a lot of performance out of the code all by itself. The question of cost benefits is something to examine. Does the benefit of faster clients outweigh the cost of this approach?
The second approach is the use of SIMD instructions: MMX, 3DNow!, SSE, SSE2, and their respective 'plus' and 'professional' versions. This approach is more challenging and depends on things that I don't know anything about. For example, are the calculations performed by D2OL single or double precision? The answer to that can determine which SIMD instructions sets are viable options. Another issue is the nature of the code. Does D2OL perform the type of calculations that would benefit from SIMD optimization? Is there a limited set of instructions being performed on a large amount of data, or does the program need more leeway than is afforded by SIMD instructions?
Just some thoughts and some questions. That discussion about optimizing S@H for the P4 was cool. Maybe we can kick the idea around for D2OL too, just for fun. Who knows, maybe we'll actually see optimized versions in the future!
My understanding of the D2OL code is limited. I know there is some Java in there as well as some C code. If memory serves, the GUI is written in Java (D2OL includes its own JRE as I discovered during my attempt to find the best JRE for the client). There really isn't much to be gained by optimizing this, as you shouldn't be looking at it in the first place!
If my above description of the client is wrong, then everything I'm about to say is irrelevent. Assuming for a minute that I've got it right, I'll proceed. There are two approaches for optimizing the client. The first is a recompile of the source using an optimized compiler specific to the CPU core, similar to the POV recompiles that make such a huge impact on performance. I'm not sure how much these optimized compilers cost or what hurdles this approach has. The obvious benefit is that the code doesn't need to be rewritten. A recompile can wring a lot of performance out of the code all by itself. The question of cost benefits is something to examine. Does the benefit of faster clients outweigh the cost of this approach?
The second approach is the use of SIMD instructions: MMX, 3DNow!, SSE, SSE2, and their respective 'plus' and 'professional' versions. This approach is more challenging and depends on things that I don't know anything about. For example, are the calculations performed by D2OL single or double precision? The answer to that can determine which SIMD instructions sets are viable options. Another issue is the nature of the code. Does D2OL perform the type of calculations that would benefit from SIMD optimization? Is there a limited set of instructions being performed on a large amount of data, or does the program need more leeway than is afforded by SIMD instructions?
Just some thoughts and some questions. That discussion about optimizing S@H for the P4 was cool. Maybe we can kick the idea around for D2OL too, just for fun. Who knows, maybe we'll actually see optimized versions in the future!