[Tutorial] Stop the abuse of stock!
#23

Quote:
Originally Posted by Onfroi
View Post
I thought stock is faster as well, more optimized, it's not?
Quote:
Originally Posted by Gammix
View Post
No, i think bit slower than a function.
Quote:
Originally Posted by ipsLeon
View Post
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
View Post
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.
Reply


Messages In This Thread
Stop the abuse of stock! - by Vince - 12.04.2015, 09:26
Re: Stop the abuse of stock! - by Glossy42O - 12.04.2015, 10:12
Re: Stop the abuse of stock! - by FernandoLight - 12.04.2015, 10:14
Re: Stop the abuse of stock! - by Emmet_ - 12.04.2015, 12:04
AW: Stop the abuse of stock! - by Mellnik - 12.04.2015, 12:05
Re: Stop the abuse of stock! - by Patrick - 12.04.2015, 16:12
Re: Stop the abuse of stock! - by Abagail - 12.04.2015, 18:06
Re: Stop the abuse of stock! - by iZN - 12.04.2015, 21:17
Re: Stop the abuse of stock! - by Michael@Belgium - 12.04.2015, 21:25
Re: Stop the abuse of stock! - by Vince - 12.04.2015, 21:30
Re: Stop the abuse of stock! - by iZN - 12.04.2015, 21:31
Re: Stop the abuse of stock! - by Michael@Belgium - 12.04.2015, 21:37
Re: Stop the abuse of stock! - by yugecin - 12.04.2015, 22:14
Re: Stop the abuse of stock! - by EiresJason - 12.04.2015, 23:42
Re: Stop the abuse of stock! - by Onfroi - 13.04.2015, 00:00
Re: Stop the abuse of stock! - by Gammix - 13.04.2015, 01:18
Re: Stop the abuse of stock! - by Abagail - 13.04.2015, 01:48
Re: Stop the abuse of stock! - by EiresJason - 13.04.2015, 01:59
Re: Stop the abuse of stock! - by Pottus - 13.04.2015, 02:11
Re: Stop the abuse of stock! - by Abagail - 13.04.2015, 02:21
Re: Stop the abuse of stock! - by arakuta - 13.04.2015, 02:24
Re: Stop the abuse of stock! - by Pottus - 13.04.2015, 02:26
Re: Stop the abuse of stock! - by iZN - 13.04.2015, 07:01
Re : Stop the abuse of stock! - by S4t3K - 13.04.2015, 15:31
AW: Stop the abuse of stock! - by Kaliber - 14.04.2015, 00:48
Re: AW: Stop the abuse of stock! - by Ahmad45123 - 17.04.2015, 23:32
Re: Re : Stop the abuse of stock! - by Bakr - 18.04.2015, 06:25
Re : Stop the abuse of stock! - by S4t3K - 18.04.2015, 18:18
AW: Re : Stop the abuse of stock! - by Kaliber - 25.04.2015, 12:51
Re: Stop the abuse of stock! - by vannesenn - 01.05.2015, 22:16
Re: Stop the abuse of stock! - by ThePhenix - 02.05.2015, 00:16
Re: Stop the abuse of stock! - by Jay_ - 03.05.2015, 14:07
Re: Stop the abuse of stock! - by Jonny5 - 18.05.2015, 00:50
Re: Stop the abuse of stock! - by Freezo - 03.09.2015, 19:25
Re: Stop the abuse of stock! - by Onfroi - 06.09.2015, 17:49
Re: Stop the abuse of stock! - by Variable™ - 06.09.2015, 17:54
Re: Stop the abuse of stock! - by SickAttack - 06.09.2015, 17:55
Re: Stop the abuse of stock! - by Tamer - 06.09.2015, 18:07
Re: Stop the abuse of stock! - by Darrenr - 15.09.2015, 11:15
Re: Stop the abuse of stock! - by DarkLored - 15.09.2015, 18:54
Re: Stop the abuse of stock! - by introzen - 04.04.2016, 16:29
Re: Stop the abuse of stock! - by Puppy - 05.04.2016, 00:11
Re: Stop the abuse of stock! - by Arastair - 05.04.2016, 03:11
Re: Stop the abuse of stock! - by Itzhak E. - 07.04.2016, 12:47
Re: Stop the abuse of stock! - by Sew_Sumi - 07.04.2016, 13:00
Re: Stop the abuse of stock! - by Sasino97 - 17.04.2016, 20:28
Re: Stop the abuse of stock! - by iKevin - 07.06.2016, 12:15
Re: Stop the abuse of stock! - by vannesenn - 07.06.2016, 16:36
Re: Stop the abuse of stock! - by LockedLucas - 07.06.2016, 18:26
Re: Stop the abuse of stock! - by TwinkiDaBoss - 07.06.2016, 19:04
Re: Stop the abuse of stock! - by Private200 - 07.06.2016, 19:16
Re: Stop the abuse of stock! - by SickAttack - 10.06.2016, 16:44
Re: Stop the abuse of stock! - by vannesenn - 10.06.2016, 18:47
Re: Stop the abuse of stock! - by Konstantinos - 10.06.2016, 18:56
Re: Stop the abuse of stock! - by Stinged - 11.06.2016, 10:12
Re: Stop the abuse of stock! - by SickAttack - 11.06.2016, 13:59
Re: Stop the abuse of stock! - by PeanutButter - 11.02.2017, 10:36
Re: Stop the abuse of stock! - by HydraHumza - 11.02.2017, 10:54
Re: Stop the abuse of stock! - by iLearner - 11.02.2017, 11:36
Re: Stop the abuse of stock! - by ATomas - 22.02.2017, 12:59
Re: Stop the abuse of stock! - by organe. - 22.02.2017, 13:13
Re: Stop the abuse of stock! - by BiosMarcel - 22.02.2017, 21:49
Re: Stop the abuse of stock! - by iKarim - 23.02.2017, 05:08
Re: Stop the abuse of stock! - by Kwarde - 16.10.2019, 20:49
Re: Stop the abuse of stock! - by [FMJ]PowerSurge - 04.05.2020, 02:57

Forum Jump:


Users browsing this thread: 1 Guest(s)