Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

code optimization trick?

Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
10-18-2007 11:26
From: Kidd Krasner
Looks like a loop to me.

Smartass.

Do {...} while (false) isn't a loop. It's a.. a.. It's not a loop. There's no looping.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Lear Cale
wordy bugger
Join date: 22 Aug 2007
Posts: 3,569
10-18-2007 12:02
lol
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
10-18-2007 13:38
From: Lear Cale
BTW, about the PHP tags: the simple workaround: hit the Quote button to see the code indented properly.

Or start one's own forum where tags work properly, which I was recently impelled to do.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
10-18-2007 14:18
well gee, didn't my slight sarcasm would stir up such a hornets nest....

as I pointed out there ARE uses for them, properly applied and used sparingly they can make code faster and simpler to read.

I've never had occasion to use them in lsl, mostly because I don't try to test 50 possible conditions at once, in a language w/o case statments, or short circuiting for &&, or various other missing common abilities =)

but it does bear reminding that it's a good rule of thumb to desigin tests (and logic) better... FIRST, and that's what I was driving at, not "jump iz teh ebil, run awayz!!!11one"

point in fact, the same instructor I quoted gave me an A+ BECUASE I used it, to preserve both the logic, readability, and speed (there was another way, but slower and less readable)
1 2 3