On Apr 9, 1:06 am, asterisc
> On Apr 8, 10:55 pm, Razii
>
>
>
> > On Tue, 8 Apr 2008 08:47:18 -0700 (PDT), asterisc
> > wrote:
>
> > >Alright man, let's do it another way.
> > >Try this:
> > >http://pastebin.com/d43068295
>
> > printf( "Time: %ld ms\n", (end - start) / CLOCKS_PER_SEC * 1000 );
>
> > I changed it back to
>
> > std::cout <<"Time: " << double(end-start)/CLOCKS_PER_SEC * 1000 << "
> > ms\n";
>
> > zealous, 80
> > zealously, 20
> > Time: 1171 ms
>
> > This version doesn't even compile with g++ (MinGW).
>
> I'm sorry about that. The printf was wrong, it should have been
> something like: %.0f.. and (float) in front of every number.
>
> However, I have reproduced your algorithm in C++.
> I have better results than the Java version. I tried it on two
> marchines and it seems faster!
>
> Altought is not correct (it puts lowercase in front of uppercase,
> which is not ok) it behaves exactly like the Java version. Same
> output, same algorithm, only a bit faster.
>
> Here is the link:http://pastebin.com/m1c5271bf
>
> Try it and post the results on your machine.
>
> I don't care about MinGW compiler. I compiled it successfull on both VC
> ++ 2003 on winXP and GCC 4.1.2 p1.0.2 on my Gentoo machine.
>
> Regards,
As a conclusion, post any Java version, I'll write it in C++ and I'll
prove you it's faster than the Java equivalent.
Your times were better because of the algorithm, not because of the
language!!! And in my previous post you have the proof.