to Thinking
Who told you that stack is faster?
look at this code:
push eax
pop eax
and compare it to this:
mov bssSegmentVariableA, eax
mov eax, bssSegmentVariableA
What would be faster?
basically push would be:
mov [esp], eax
sub esp, 4
(It would be possibly slightly optimized, hopefully, you never know with current industry.)
I agree that more smart interaction to GC and memory allocation from the application would be kawaii, but I doubt a stack overflow (actually underflow, it counts backward.) would be nice.
[quote] 70 fps with 100000 3 vertex polygons,
[/quote]
3 vertex polygon is often called triangle. So we would have a 100000 triangles doing a some rotation at 70 FPS. 7 Mil triangles? Buee my Riva TNT2 is too slow.
And now seriously. Xith3D demo had around 14 000 triangles/polygons in one frame, it looked nicely. If you will be thinking about 100000 triangles you would be attempting to do a race with the Square soft for the most inefficient graphic engine in a seriously released game. For your information, you’d lose. They have PS2 and they would have PS3.
(Brute force 30 FPS on PS2. 2 chips specialized on rendering.)
Actually why I said seriously?
to Elias
[quote] And the most important argument is that you get to loose all those ugly static global variables you spoke about, and move them into the functions that need them.
[/quote]
“My sister was bitten by a loose.” ~_^
About what static variables are you talking? Object re-usage, and helper objects are efficient way to deal with this problems. Look at my example at the start of this post, you’d need to emulate something like that.
Of course if you can change stack’s size at runtime, you might have a luxury of object allocation at a 2 MB big stack.
to Cas
So you think we would need to hint GC more than just by System.gc(); I agree, some additional informations to GC would be nice, at the runtime. Also better application controlled memory allocation is necessary. (I didn’t tried 1.5 so I don’t know if -XmxmemoryUnlimited was added as a default.)