Quote:
Originally Posted by Onfroi
I thought stock is faster as well, more optimized, it's not?
|
Quote:
Originally Posted by Gammix
No, i think bit slower than a function.
|
Quote:
Originally Posted by ipsLeon
Nice tutorial, will help a lot of beginners, and one more reason for don't use stock: your code will be faster, stocks are "lazy". If you want to do a smart and fast script its a nice way to start.
|
Adding that modifier won't make a difference, it will NEVER make your function faster nor slower. Your piece of code reflects the optimization and the speed of it. For example, calculating something very intensive in your function will obviously make that function "abit" slower than the normal one having nothing just a "printf()" statement for say.
@ipsLeon: I don't know if you implied the laziness of the scripter, or the speed comparison of "stock", I apologize if I quoted you wrongfully.
Quote:
Originally Posted by arakuta
There is no point to say whether write stock in front of functions in GM's/FS's or not.
It's the same discussion doing
PHP Code:
MyItem() {
// Some shit
}
PHP Code:
MyItem()
{
// Some shit
}
Its just estetic, and will provoke only infinite discussions.
|
Sorry but discussion about indentation is not the same with something logical. This discussion is not something "esthetic" it is just a piece of advice for scripters and it won't provoke infinite discussion, it will just answer some unanswered questions.