R3G3N Posted April 16, 2018 Share Posted April 16, 2018 Is it better CPU performance-wise to write one big script in the onLoop, using a task based system, or using states? Quote Link to comment Share on other sites More sharing options...
Team Cape Posted April 16, 2018 Share Posted April 16, 2018 no real difference, it's just a framework for the code that you're already going to write. Quote Link to comment Share on other sites More sharing options...
John Cena Posted April 16, 2018 Share Posted April 16, 2018 Whatever you prefer, but personally you should use task based system. Quote Link to comment Share on other sites More sharing options...
IDontEB Posted April 16, 2018 Share Posted April 16, 2018 Every less if statement you use you shave off nanoseconds of CPU usage needed to evaluate the expression Quote Link to comment Share on other sites More sharing options...
Tom Posted April 16, 2018 Share Posted April 16, 2018 1 hour ago, IDontEB said: Every less if statement you use you shave off nanoseconds of CPU usage needed to evaluate the expression And countless more errors you introduce 1 Quote Link to comment Share on other sites More sharing options...
Fruity Posted April 16, 2018 Share Posted April 16, 2018 4 hours ago, R3G3N said: Is it better CPU performance-wise to write one big script in the onLoop, using a task based system, or using states? depends really, if done well i dont see a massive issue. What tends to happen with task based scripts is there is alot of repeated code in each of the task 'validation' methods that could be avoided if it wasn't and this can cause usage to go up. Quote Link to comment Share on other sites More sharing options...