Edwin Leuven <[EMAIL PROTECTED]> writes:

| ...completely unrelated and just wondering what the experts say. 
>
| How about:
>
| for(int i = 0; i < tabular->rows(); ++i) {
|     for(int j = 0; j < tabular->columns(); ++j) {
>
>
| as opposed to:
>
| int const r = tabular->rows();
| int const c = tabular->columns();
| for(int i = 0; i < r; ++i) {
|     for(int j = 0; j < c; ++j) {
>
| What is better? would it make a difference performance wise?

Depends on how much needs to be reevaluated to regure out the rows and
columns...

if the class function rows() is an inline version that is just
returning an int... then I prefere the for(... tabular->rows() ...)
version.

-- 
        Lgb

Reply via email to