12 | | As a simple comparison, suppose you need a list of all integers between 100000 and 200000. You could write a loop to fill 1000 elements of an {{{ArrayList}}}. This takes you about a megabyte of memory plus the time of filling the array. Alternatively, you can use {{{RangeInt(100000,200000, 1)}}}. This takes almost no memory (storing 3 BigDecimals plus some overhead), and no additional time. |
| 12 | As a simple comparison, suppose you need a list of all integers between 100000 and 200000. You could write a loop to fill all elements of an {{{ArrayList}}}. This takes you about a megabyte of memory plus the time of filling the array. Alternatively, you can use {{{RangeInt(100000,200000, 1)}}}. This takes almost no memory (storing 3 BigDecimals plus some overhead), and no additional time. |