Ok heres the deal,
bmax allows you make assignments like this..
matrix[0]=matrix[1]=matrix[2]=matrix[3]= ..
matrix[4]=matrix[5]=0
i expected this to be equivalent to the following..
matrix[0]=0
matrix[1]=0
matrix[2]=0 .......
i use both approaches to create a unit matrix - but having
looked at the assembly code generated for the first
version..its ugly as hell - and im not convinced its even
behaving correctly...i dont know my 8086..but it jst
doesnt look ok...
The second version produces very clean, simple assembly
output...
i would have expected the first version to help the compiler optimise the code..setting the float const once +
writing to the memory addresses..this is not the case
perhaps someone can tell me why the first
version is such an distaster? - perhaps its cuz it doesnt
work like it does in c/c++ ... anyway, jst thought it was
interesting..
bmax allows you make assignments like this..
matrix[0]=matrix[1]=matrix[2]=matrix[3]= ..
matrix[4]=matrix[5]=0
i expected this to be equivalent to the following..
matrix[0]=0
matrix[1]=0
matrix[2]=0 .......
i use both approaches to create a unit matrix - but having
looked at the assembly code generated for the first
version..its ugly as hell - and im not convinced its even
behaving correctly...i dont know my 8086..but it jst
doesnt look ok...
The second version produces very clean, simple assembly
output...
i would have expected the first version to help the compiler optimise the code..setting the float const once +
writing to the memory addresses..this is not the case
perhaps someone can tell me why the first
version is such an distaster? - perhaps its cuz it doesnt
work like it does in c/c++ ... anyway, jst thought it was
interesting..