[REBOL] Re: random string
From: anton:lexicon at: 10-Apr-2002 21:20
Ok, you want to talk about performance? Are you going to use it many millions of times in a loop? Then better do this: salt-string: clear "" loop 8 [ insert tail salt-string to-char add random 78 48 ] Two optimizations: 1) clear, instead of copy, reuses the memory instead of allocating new memory each time. 2) insert tail, instead of append, avoids an extra mezzanine function call. (Just look at the source of append). Anton.