Re: string.random
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: string.random
- From: Markus Huber <pulse@...>
- Date: 2004年7月18日 19:18:04 +0200 (BST)
Dear Adrian,
thank you for your good help. Indeed your code is faster. To produce
5000 times an 32 char-random-string with the pattern %l%d my simple
version needs about ~1.9 sec and your tuned version needs ~0.7 sec.
Some corrections:
do -- block for upvalues --> not needed
Built = {'.',AllChars} --> Built={['.']=Chars}
string.sub(S,Loop,Loop+1) --> string.sub(S,Loop,Loop)
I will place the tested code to the lua-wiki.
--
Markus