On Apr 12, 9:49 pm, Razii
> On Sat, 12 Apr 2008 06:11:56 -0700 (PDT), Mirek Fidler
>
>
> >> Time: 4562 ms (U++)
> >> Time: 27781 ms (g++)
>
> >> java -server -Xms1024m -Xmx1024m
>
> >> Time: 3578 ms (max memory I saw was on 300 M -- but at least it
> >> finished 7 times faster than g++ ...
>
> >> with -Xms75m -Xmx100m the time is around: 9969 ms
>
> >> On Jet, 2344 ms (wow, that was fast but memory peak was 600 MB!)
>
> >IMO, manual management still wins...
>
> No it didn't. g++ and vc9 are at least three times slower in this
> case, even if I use -Xms75m (which is appropriate for this case). I
> have a choice to increase -Xms value and make it 8 times faster.
Well, I guess you are doing it again - finetuning conditions to
achieve "victory".
I could do equivalent (introducing better algorithm, custom allocator,
more parameters), but that would hardly prove anything, as I have a
little use of such tricks in my regular code. Normal code has to deal
with datasets of any size using as little memory as possible.
The final truth is that generally (that means, before you start to
change conditions to fit your case), optimal manual memory management
is faster and wastes significantly less memory than GC.
Mirek