Bruno Causse wrote:
>A kind of hastable 2*2^22 objects (one array) + one array of 200Mo (data for
>evaluation) = 700Mo for data
How much physical RAM is in the machine? If it's less than 1 GB, you could
be seeing disk-swapping slowdowns.
With 700 MB, you might be suffering from low cache hit-rates, too, but
there's usually not much you can do about it in Java, except use arrays of
primitives and locality of reference (which is still not guaranteed).
Arrays of primitives may be impractical or impossible for your data
representation.
I suggest profiling your code before doing anything else. Even the
simplest profile would tell you which code was taking the most time.
Without an actual measurement of what's really happening, you can't
optimize effectively because you can only guess at what counts most. If
you don't improve the things that count most, your effort is wasted -- all
the numbers are against you.
The simplest profile in Java is this option:
java -Xprof ...
It outputs a simple profile to stdout, so redirect it to a file if you want
to save it. There may be documentation on the output format, but I don't
know of any (Google might find something). I just puzzled it out for
myself, since it's pretty straightforward if you know that each grouping is
one thread.
The fancier profile is:
java -Xrunhprof ...
Its output format is not very readable, but there are free tools that read
it and show graphs and such. Read 'man java' for details of -Xrunhprof,
since it has several sub-options. Google for tools that graph the profile
data.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden