My idea was to have zero LS wasted for code. Pure hardware streaming, and the hardware takes care of suspending/resuming your "thread" etc, and latency can be managed via several hyperthreads, very similar to how GPUs handle Vertex/Pixel shader streaming.
One might be able to stream code "just in time" manually, but that might be very difficult to pull off. It is easier if you partition the code like Insomniac suggested and bring snippets with your data.
I understand and appreciate your thoughts. I suppose I should of qualified what I said. I meant that this could work in specific circumstances and perhaps in some of the situations you are facing. I do not mean that this should be a general practice in programming for SPUs. That would be a difficult undertaking to say the least. I think most would agree with you and Insomniac.
Barbarian said:Well, some issues are inherent to C/C++, such as aliasing problems (exemplified with the "this" pointer), but I think compilers can definitely improve more. Some of the issues are caused by the ABI as well, for example, the inability to return a Matrix class in a set of 4 registers. Touching memory on those PPC cores is a nightmare because of the rampant LHS/cache issues. On SPU it's much much simpler really, there, it's just getting GCC to output decent code, that's all. For now even Sony admits that C with Intrinsics is the way to go - the ICE team was quoted as saying they get 20x improvements compared to any vector abstraction.
Well debates are never long when it comes to where C and C++ belong. Core engine = C with intrinsics. Higher level stuff = C++/some scripting language. I wonder why compilers still aren't a bit more proficient with virtual functions...I just read a paper on compiler tech which claims to improve peformance 18% (by optimizing them out etc) with them across the board and it was dated back in 1996.
Also when it comes to something as basic as a vector it's probably going to be difficult for some time to best intrinsics.
With respect to the ABI has of any group brought such issues to Sony? Something a little more forceful than reports and bug issues if you know what I mean.
PPE cache issues...like stalling on hits? Every effort to offload work from the PPE is a good effort as I'm sure you well know.
I'm curious have you attempted or had any success with compile time polymorphism? I know I'll get crucified for mentioning templates but they can work out if handled correctly.
Barbarian said:I actually really like the openness that Insomniac show with their technology blogs. I work for a 3rd party developer and we very rarely get a glimpse of what the 1st party studios are doing, let alone get access to their tech.
Insomniac is certainly to be commended for taking their stance in an NDA stricken world. For that matter I read somewhere that Naughty Dog was going to be a lot more open with their tech as well. Its not a bad idea to listen to what they have to say either.
Barbarian said:I do believe A LOT of the developers can benefit from Sony delivering a healthy mix of high level libraries coupled with low level access when needed. Sony DID try that with the initial OpenGL implementation but nobody was happy because it run poorly. Then they switched to GCM which is very low level library, but unfortunately it was (last i checked) incompatible with the OpenGL layer, and hence fracturing the development efforts and having studios making a choice which way to go, way early on, possibly before they even knew what they needed.
The moaning about PSSG was/is hard to miss. Again I'd like to ask if a consorted group has or is willing to bring the issue directly to Sony? It never hurts to have proper direction going forward.
Last edited by a moderator: