[Tutorial] New Code Optimizations
#4

neat

Quote:
Originally Posted by maximthepain
Посмотреть сообщение
Can you explain about when we should use stock or public and whats more optimized to which function?
ex:
Код:
public SavePlayerData(playerid)
or
Код:
stock SavePlayerData(playerid)
Or it doesn't matter in speed matters?
public functions headers are saved in memory, so you can call them using CallLocal/RemoteFunction or SetTimer(Ex). If you aren't using any of the mentioned functions to call yours, there is no point to forward a public function. stock is not a function declaration keyword. It's used to tell compiler that if you aren't using this function anywhere in the code, he should ignore it.
Reply


Messages In This Thread
New Code Optimizations - by Yashas - 04.07.2015, 04:01
Re: New Code Optimizations - by Gammix - 04.07.2015, 09:59
Re: New Code Optimizations - by maximthepain - 04.07.2015, 10:33
Re: New Code Optimizations - by theYiin - 04.07.2015, 10:36
Re: New Code Optimizations - by Cypress - 04.07.2015, 10:42
Re: New Code Optimizations - by sammp - 04.07.2015, 10:51
Re: New Code Optimizations - by sammp - 04.07.2015, 10:59
Re: New Code Optimizations - by Gammix - 04.07.2015, 11:53
Re: New Code Optimizations - by Yashas - 04.07.2015, 15:49
Re: New Code Optimizations - by PT - 04.07.2015, 16:04
Re: New Code Optimizations - by Macluawn - 04.07.2015, 16:09
Re: New Code Optimizations - by Yashas - 04.07.2015, 16:17
Re: New Code Optimizations - by Gammix - 04.07.2015, 16:40
Re: New Code Optimizations - by Macluawn - 04.07.2015, 16:41
Re: New Code Optimizations - by Yashas - 04.07.2015, 16:53
Re: New Code Optimizations - by Macluawn - 04.07.2015, 16:56
Re: New Code Optimizations - by Yashas - 04.07.2015, 16:59
Re: New Code Optimizations - by Lynn - 04.07.2015, 17:17
Re: New Code Optimizations - by rymax99 - 04.07.2015, 17:52
Re: New Code Optimizations - by Gammix - 05.07.2015, 02:31
Re: New Code Optimizations - by Tamer - 05.07.2015, 19:50
Re: New Code Optimizations - by Stanford - 06.07.2015, 03:07
Re: New Code Optimizations - by Cypress - 06.07.2015, 20:31
Re: New Code Optimizations - by Yashas - 07.07.2015, 01:57
Re: New Code Optimizations - by Sime30 - 07.07.2015, 17:58
Re: New Code Optimizations - by kristo - 07.07.2015, 18:09
Re: New Code Optimizations - by Sime30 - 07.07.2015, 18:59
Re: New Code Optimizations - by JokeyL - 25.01.2016, 16:38
Re: New Code Optimizations - by iKarim - 25.01.2016, 16:45
Re: New Code Optimizations - by vannesenn - 16.06.2016, 23:38
Re: New Code Optimizations - by Crystallize - 16.06.2016, 23:43
Re: New Code Optimizations - by Gammix - 16.06.2016, 23:43
Re: New Code Optimizations - by Vince - 17.06.2016, 09:37
Re: New Code Optimizations - by Gammix - 17.06.2016, 10:02
Re: New Code Optimizations - by vannesenn - 17.06.2016, 14:38
Re: New Code Optimizations - by vannesenn - 17.06.2016, 21:23
Re: New Code Optimizations - by Yashas - 20.06.2016, 17:22
Re: New Code Optimizations - by Yashas - 21.07.2016, 13:23
Re: New Code Optimizations - by Kaperstone - 15.01.2018, 21:21
Re: New Code Optimizations - by Yashas - 31.01.2018, 17:42

Forum Jump:


Users browsing this thread: 7 Guest(s)