Multi-dimensional Array Initialization [C++] (25)

19 Name: #!/usr/bin/anonymous : 2007-11-02 12:31 ID:AkEOQ1Xr

>>18
I think you mean that it's equivalent to @{$x[$y]}[$z]. -> dereferences a reference, only somewhat unlike a @/$/% prefix would. I.e. $hashref->{something} works like %$hashref{something}.

>>11
They haven't listed simple instruction timings since the ppro started with the micro-ops thing. From a P2/P3 optimization manual I downloaded some years back, it seems that a "MUL eax, m/r32" instruction is decoded to 3 dependent micro-operations. (IMUL between registers decodes to just one.)

So yeah, a lot of seat-of-the-pantsing here. The point is that multiply operations are cheaper than indirecting through a pointer array, and if you're doing FP matrix computations they'll issue to the otherwise unused integer units which makes them close as can get to free.

This thread has been closed. You cannot post in this thread any longer.