MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Languages
> 'comon miro... how many times have you coded the following...
>
> byte *t1,t2;
>
> ...
> for (i=0;i<length;i++) *t1++ = *t2++;
>
> or something simialr?
>
> Such array walkign is MUCh faster then array access with [], but yould
> never guess that unless you understood what C is doing.
Not if your compiler's optimizer is worth a bother. I have seen at
least one compiler that compiles these to exactly the same code.
And then, memcpy is the right way to do it (as library specs say
that that's the function for this job).
But this shows another VERY alarming symptom of C/C++ infestation:
One shouldn't have to think in the assembler when compilers are able to prove
theorems about your code.
Miro
- Thread context:
- Re: [MUD-Dev] Languages, (continued)
- Re: [MUD-Dev] Languages,
Cynbe ru Taren cynbe#laurel,actlab.utexas.edu, Sun 25 May 1997, 05:33 GMT
- Re: [MUD-Dev] Languages,
Jeff Kesselman jeffk#tenetwork,com, Sun 25 May 1997, 05:43 GMT
- Re: [MUD-Dev] Languages,
Jeff Kesselman jeffk#tenetwork,com, Sun 25 May 1997, 08:10 GMT
- Re: [MUD-Dev] Languages,
Jeff Kesselman jeffk#tenetwork,com, Sun 25 May 1997, 08:14 GMT
- Re: [MUD-Dev] Languages,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Mon 26 May 1997, 00:10 GMT
- Re: [MUD-Dev] Languages,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Mon 26 May 1997, 00:10 GMT
[ Other Periods
| Other mailing lists
| Search
]