EvilZone

Programming and Scripting => Projects and Discussion => : Huntondoom May 21, 2011, 07:00:30 PM

: [help]Arrays() and lists Limits
: Huntondoom May 21, 2011, 07:00:30 PM
for a project Im going to use big ass Arrays / lists
but what are the limits?
and how can I find out?
: Re: [help]Arrays() and lists Limits
: Stackprotector May 21, 2011, 08:37:01 PM
Where do you want to use it for?? , not better using a sql db?? or a db file like sqlite ?
: Re: [help]Arrays() and lists Limits
: Huntondoom May 21, 2011, 08:47:46 PM
Where do you want to use it for?? , not better using a sql db?? or a db file like sqlite ?
temporary saving a lot of bytes, do stuff with it and put it away :P
: Re: [help]Arrays() and lists Limits
: ande May 22, 2011, 12:18:52 AM
Just test it?

:
// Logical code

// Test array count limit. Run until crash
loop
{
     // Add a new record to array with one byte
}

// Test array size limit. Run until crash
loop
{
     // Add a new record to array with 100k bytes
}


But, I bet arrays will have less limits, on the other hand your RAM might be your only limit..
: Re: [help]Arrays() and lists Limits
: Huntondoom May 22, 2011, 11:57:43 AM
Just test it?

:
// Logical code

// Test array count limit. Run until crash
loop
{
     // Add a new record to array with one byte
}

// Test array size limit. Run until crash
loop
{
     // Add a new record to array with 100k bytes
}


But, I bet arrays will have less limits, on the other hand your RAM might be your only limit..
I shall Test it you might hear it later from me
: Re: [help]Arrays() and lists Limits
: Tsar May 22, 2011, 05:57:07 PM
I don't think there would be a limit, although depending on if your using an IDE or something there may be. Also depends on the language, if your using java there might be a limit, if your using c/++ probably not.

How big are we talking here anyways? Even if you have a array of 10,000,000 bytes that is only 9MB of memory.
: Re: [help]Arrays() and lists Limits
: Huntondoom May 22, 2011, 06:01:41 PM
How big are we talking here anyways? Even if you have a array of 10,000,000 bytes that is only 9MB of memory.

Depends on it but it should handle pretty big numbers
from 1mb to 100mb worth of bytes
depends on it though :P
: Re: [help]Arrays() and lists Limits
: ca0s May 22, 2011, 06:14:36 PM
I would use lists. If you work with an array, and delete one of those members, you will have a void member (well, you could move the rest to fit but with large amounts of data it would be a pain). With lists, you can access easily to each member too and memory is used more efficiently, I think. Also, lists give you the ability of add more members (if there is enough memory available). With an array, you have to specify at compile-time its size (at least, in C). So you may get it full.
: Re: [help]Arrays() and lists Limits
: Huntondoom May 22, 2011, 06:50:58 PM
I tried to test it but It was long and boring so I stopped it:
result:
14.000.000 bytes