![]() |
What is faster ? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: What is faster ? (/Thread-What-is-faster) |
What is faster ? - darksun84 - 05-22-2013 02:49 AM Premise : Values are "fixed", they range from 0 to 1000 with increments of 100. What will be the faster way for sphere to assign a bonus that depends on those fixed "numbers" ? PHP Code: // Method 1 : A simple math formula ![]() Also i can't test it right now with the script profiler ![]() RE: What is faster ? - Gil Amarth - 05-22-2013 03:46 AM I think second is marginally faster, but anyways two boths methods are pretty fast, the difference is almost zero. I´ll use the first only for simplicity. RE: What is faster ? - Wap - 05-22-2013 11:16 PM Code: [FUNCTION TESTSCPSPEED] RE: What is faster ? - darksun84 - 05-22-2013 11:30 PM Nice i'll try that ![]() How much is reliable compared to the built in script profiler ? RE: What is faster ? - Gil Amarth - 05-23-2013 01:21 AM I have tried, it´s faster method 1... |