Mail Archives: djgpp/1998/03/04/10:30:52
James Undery wrote:
> In article <34FD3174 DOT 2401F904 AT gong DOT snu DOT ac DOT kr>, Bum-Seok Hyun
> <dominic AT gong DOT snu DOT ac DOT kr> writes
> >In C code, I just moved variable definitions
> >into the first line of the code.
>
> Why, a fairer comparison of C and C++ is to compile the C as C++
>
I did what you told me to.
But the gap of computing time between C and C++
still remained almost the same.
> >I don't think that makes musch difference between C++ and C.
>
> Yes it does, or certainly would do with objects. 'j' would be
> constructed (and destructed) 10000 times and 'k' 100000 times.
If the variables, i,j,k are objects, you could be right.
> That said the C++ is still slower 22s (25s using your code) compared to
> 16s (on my system).
> --
Excuse me, sir.Exactly what did mean using my code and yours?
> James Undery <james AT ghoti DOT demon DOT co DOT uk>
THANKS !!!
------------------------------
Bum-Seok Hyun
mailto:dominic AT gong DOT snu DOT ac DOT kr
- Raw text -