Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> whether that's achieved by reducing the number of things you do, or by doing them more efficiently

Is there any way to do stuff more efficiently instead of doing less things (i.e. doing it in less steps)? Optimizing is always about trimming out the fat.



Depends on what you're defining as "things". In terms of base instructions? No, all you can do is do less things. (Edit: Although even here, you can do different things to make the overall process cheaper - multiply by the inverse instead of dividing, replace a sin() calculation with a lookup, etc.) In terms of intermediate goals? If you have to process 500 objects, you can either find a way to skip some of the objects ('reduce the number of things you do') or you can make processing an object as fast as possible ('doing them more efficiently').




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: