Even so, there is still an overhead of 24 bytes per element of the array before you put anything in it. If you have to create a second array (list) to hold the indexes, the weightings have to be pretty large for the savings in replicating the indexes rather than the strings, to balance out the cost of creating that second list.
In reply to Re: Re: Re: Re: Re: Weighting rand()
by BrowserUk
in thread Weighting rand()
by hacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |