| Mirage Source http://web.miragesource.net/forums/ |
|
| "Short-circuit evalution" in VB6 http://web.miragesource.net/forums/viewtopic.php?f=210&t=3197 |
Page 1 of 1 |
| Author: | Rezeyu [ Mon Dec 24, 2007 7:30 am ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
I do this too, wasn't sure if it would speed up anything, I just did it for organizational purposes. |
|
| Author: | Robin [ Mon Dec 24, 2007 9:39 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
DFA wrote: yeah, actually a pretty important optimization in my opinion Hardly. The time it takes to do the checks is negligible. If you wanted to sort out the packet system, you'd convert to byte arrays. |
|
| Author: | Robin [ Mon Dec 24, 2007 9:44 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
That's like asking why Booleans exist when you can store the same value in a Byte. |
|
| Author: | Robin [ Mon Dec 24, 2007 9:49 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
Yet it exists in VB6.0 as a few bytes. Stop asking questions about why different things are there in the language, we can only speculate. xD |
|
| Author: | Robin [ Mon Dec 24, 2007 10:24 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
Hahahaha xD <3 |
|
| Author: | Dragoons Master [ Tue Dec 25, 2007 6:33 am ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
That's very common in C based languages, if(function()){ } and the oposite if(!function()){ } which is the same as If Not function Then |
|
| Author: | Lea [ Tue Dec 25, 2007 6:41 am ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
The compiler probably takes that comparison out. |
|
| Author: | Lea [ Tue Dec 25, 2007 4:22 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
That's strange.... were you compiling for speed? Gotta change those optimization settings ;D |
|
| Author: | Lea [ Tue Dec 25, 2007 8:02 pm ] |
| Post subject: | Re: "Short-circuit evalution" in VB6 |
I would remove all the "checks". Array Bounds Overflow, Floating Point Error, and Pentium FDIV Checks. As far as I can tell, they don't do anything visible. With array bounds checks in place, you still get a runtime error if you go out of bounds... so... why have them? Verrigan's done an indepth anaylisis of these options, it's posted around somewhere... I can't be bothered to search for it right now. Knowledge Base maybe. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|