Originally Posted By: RoCk
One identifier may not make a noticeable difference, but add that one unnoticeable difference together with all the other unnoticeable differences and suddenly you have a noticeable difference. But you're right, 10ms is nothing to worry about.


Only if it's all done at once. And in most cases, that is not true. There was discussion over how not using {}'s could make it "noticeably" faster. I have a LOT of scripts running and many of them use TEXT events in channels with a lot of text. The majority of code in my scripts use {}'s and there isn't enough of a slowdown to even notice without trying to detect it with a script. Everything happens fast enough that it might as well be called "instant." Sure, if you went through and ran all of my scripts without those {}'s and tested it with a script, you'd find that not using them would be faster... but when actually using the scripts as they are currently written, there isn't anywhere near enough slowdown to notice.

It would really take a lot of things happening all at once for it to really be noticeable, or else some loop that needs to loop a LOT of times before getting a result, or something similar. That's all I'm saying. I believe in optimizing code, but there are just some things that really aren't worth bothering with and {}'s or ()'s or #/$chan are some of them. As such, I would use:

Code:
if (this == that) { do this in $chan }


Rather than:

Code:
if (this == that) do this in #


Or:

Code:
if this == that { do this in # }


Or whatever. Again, it's just my opinion. Besides, I personally find the first one much easier to read quickly without having to think about it. That makes for easier debugging.