Memory Allocation in Java
- From: Christopher Smith <csmith@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 26 Aug 2006 09:48:11 -0500
Hi All -
Problem: I have a large array of floating point numbers I need to look
for. These results come from a brut-force grid search, where the
coordinates (x,y) are non-parametric test results.
The problem is that the length of x and y, and thus the size of the grid is
quite large. The length is a minimum of 120,000 both directions on the
grid, for a total of 14,400,000,000 possible combinations. Which obviously
consumes a lot of memory -- somewhere on the order of 500 MB, if 32-bit
floating point.
I'm trying to think through the best way to handle this. Currently, I'm
setting up an array Array[][] results = new Array[120000][120000].
Questions
When intitailizing the array, the ide usually hangs. Is the compiler
trying to find contingous memory?
Is there a better way to handle this the results? If I initialized a
vector of length 14.4 million, would that be faster? Any ideas are greatly
appreciated.
Thanks, chris
.
- Follow-Ups:
- Re: Memory Allocation in Java
- From: Eric Sosman
- Re: Memory Allocation in Java
- From: Patricia Shanahan
- Re: Memory Allocation in Java
- From: Andrew Thompson
- Re: Memory Allocation in Java
- Prev by Date: Re: JCreator beginners question
- Next by Date: Re: Memory Allocation in Java
- Previous by thread: Vector Sort
- Next by thread: Re: Memory Allocation in Java
- Index(es):
Relevant Pages
|
|