Results 1 to 3 of 3
  1. #1
    boys21 is offline Member
    Join Date
    May 2010
    Posts
    14
    Rep Power
    0

    Default memory saving alternate to arrays

    hi


    I am working with data sets of length around 1 million. all values are float. is there any smarter way to deal apart from arrays. if i create an array of length 1 million, probably memory consumption is too high!! (1 million x 4 bytes per each float value). Its always a computational over head while dealing with large datasets and arrays.

    Is there any alternative to solve this?

    Thanks in advance

    Br,
    Boys21

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,368
    Blog Entries
    7
    Rep Power
    20

    Default Re: memory saving alternate to arrays

    Quote Originally Posted by boys21 View Post
    (1 million x 4 bytes per each float value).
    That makes about 4MB; if your Java process has, say, 1GB at its disposal that makes 0.4% of the total memory; don't even think about it anymore.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    boys21 is offline Member
    Join Date
    May 2010
    Posts
    14
    Rep Power
    0

    Default Re: memory saving alternate to arrays

    okay.. thank you very much! :)

Similar Threads

  1. Arrays memory allocation
    By maya700 in forum New To Java
    Replies: 5
    Last Post: 07-16-2011, 08:47 AM
  2. Arrays memory addresses
    By Dayanand in forum New To Java
    Replies: 2
    Last Post: 03-04-2011, 09:17 AM
  3. Replies: 4
    Last Post: 08-01-2010, 09:25 AM
  4. Alternate Algorithm? Can you think of one?
    By VinceGuad in forum New To Java
    Replies: 8
    Last Post: 03-18-2009, 04:40 AM
  5. Replies: 2
    Last Post: 12-07-2008, 06:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •