Difference between revisions of "User talk:Pedro Oval/Base64 HMAC MD5"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 4: Line 4:


(One of) The reason(s) LSO is so slow is that it copies every parameter during a function call, if you used a Global for "b64", "H[1-4]" and "i" values it would be much faster (as you would be duplicating the variable fewer times). Of course doing so is evil. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 22:23, 16 December 2010 (UTC)
(One of) The reason(s) LSO is so slow is that it copies every parameter during a function call, if you used a Global for "b64", "H[1-4]" and "i" values it would be much faster (as you would be duplicating the variable fewer times). Of course doing so is evil. -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 22:23, 16 December 2010 (UTC)
: Thank you. I've implemented the first one, but after giving a a try at the globals idea and performing a timing comparison, I concluded that the time used in parameter passing must be negligible compared with the processing time, because I noticed no timing difference. The only pitfall I see is that the extra nesting level could pose a memory problem in LSO with the passing of a long b64, but making it global is too yucky. AFAIK Mono strings don't suffer that problem, and using this function in LSO is somewhere between masochist and suicidal anyway. -- [[User:Pedro Oval|Pedro Oval]] 02:36, 22 December 2010 (UTC)

Revision as of 19:36, 21 December 2010

Suggestions

If you change "T = llList2Integer(x,i);" to "T = llList2Integer(x,~i);" you don't need to reverse the order of x (allowing you to discard the "x = [H4, H3, H2, H1];"). You might find User:Strife_Onizuka/int2hexdword interesting.

(One of) The reason(s) LSO is so slow is that it copies every parameter during a function call, if you used a Global for "b64", "H[1-4]" and "i" values it would be much faster (as you would be duplicating the variable fewer times). Of course doing so is evil. -- Strife (talk|contribs) 22:23, 16 December 2010 (UTC)

Thank you. I've implemented the first one, but after giving a a try at the globals idea and performing a timing comparison, I concluded that the time used in parameter passing must be negligible compared with the processing time, because I noticed no timing difference. The only pitfall I see is that the extra nesting level could pose a memory problem in LSO with the passing of a long b64, but making it global is too yucky. AFAIK Mono strings don't suffer that problem, and using this function in LSO is somewhere between masochist and suicidal anyway. -- Pedro Oval 02:36, 22 December 2010 (UTC)