Code optimisations
#11

I just want to say that a lot of the information in this topic is now obsolete. The general approach to optimisation is:

1) Just write your code, try make it good, but don't waste time making it excellent. A lot of these tips sacrifice readability for TINY improvements you will never notice.

2) If you actually notice some code running slowly, profile it with the profiler plugin. That will tell you exactly what code is truly running slowly.

3) Once you know which part is slow, you can improve the ALGORITHMS! You could write a bubble sort in hand-optimised x86 assembly, but it will still be beaten by a PAWN version of quicksort, because quicksort is just a better way of doing things!

4) Only then should you use the tips listed here to get the most out of the worst offending pieces of code.

You could spend hours making a function 50% faster, but if it is only called once an hour it doesn't matter. On the other hand, if you determine that another function is called 50 times a second, then just a 0.5% improvement will be far more useful!
Reply


Messages In This Thread
Code optimisations - by Misiur - 19.04.2015, 16:43
Re: Code optimisations - by zeax - 22.04.2015, 01:21
Re: Code optimisations - by Misiur - 22.04.2015, 10:19
Re: Code optimisations - by Ahmad45123 - 22.04.2015, 12:17
Re: Code optimisations - by Azula - 22.04.2015, 12:29
Re: Code optimisations - by Niko_boy - 23.04.2015, 13:40
Re: Code optimisations - by Crayder - 11.07.2015, 06:26
Re: Code optimisations - by Eoussama - 10.12.2017, 13:21
Re: Code optimisations - by DRIFT_HUNTER - 12.12.2017, 15:19
Re: Code optimisations - by Worstworld - 18.02.2018, 14:24
Re: Code optimisations - by Y_Less - 18.02.2018, 15:07

Forum Jump:


Users browsing this thread: 1 Guest(s)