User talk:Void Singer/Teacup

From Second Life Wiki
Jump to navigation Jump to search

Minor Optimisation

Great little script! Just curious though about this line: <lsl>if (~llListFindList( [200, 404], [vIntDta] )){</lsl> Is there a particular reason why you went for that in preference of a simple condition? As conditions are always faster: <lsl>if ((200 == vIntDta) || (404 == vIntDta)){</lsl> I assumed it was for readability or ease of editing, but I'm not sure there's really any advantage to searching a static list?
-- Haravikk (talk|contribs) 06:24, 15 April 2011 (PDT)

I was actually aiming for extensibility.... the 0.1 version actually supported 200, 201, 202, 204, 205, and 404 messages... so that code made a little more sense in that rendition. When I simplified, I just pulled out the currently unused codes to limit invalid link messages triggering the code. I should probably ad some of those back in, but I was considing allowing them to be used internally by file systems.... still kinda up in the air about it. but I'll make sure to comment it for now, and replace it if we reserve it for internal coms.
-- Void (talk|contribs) 19:53, 15 April 2011 (PDT)