Optimization
#9

Instead of using a loop that loops through 500 ID's, and check if a player is connected in that ID, you should rather use foreach.
It's more efficient by only looping through connected players.

But in that example you gave, there's no reason to use a loop at all.
Reply


Messages In This Thread
Optimization - by Etolas - 20.02.2015, 07:00
Re: Optimization - by Kenway - 20.02.2015, 07:04
Re: Optimization - by Etolas - 20.02.2015, 07:06
Re: Optimization - by CalvinC - 20.02.2015, 07:09
Re: Optimization - by Kenway - 20.02.2015, 07:10
Re: Optimization - by Etolas - 20.02.2015, 07:12
Re: Optimization - by arakuta - 20.02.2015, 10:13
Re: Optimization - by AndySedeyn - 20.02.2015, 10:30
Re: Optimization - by CalvinC - 20.02.2015, 10:39
Re: Optimization - by Kyance - 20.02.2015, 13:02

Forum Jump:


Users browsing this thread: 3 Guest(s)