-
-
Notifications
You must be signed in to change notification settings - Fork 3
MinimizeWork
Using too much CPU creates heat, which means more energy consumption and errors. Also it's one of the primary resources of your computer. Some of your CPU overhead can be moved to your graphics card (keywords: CUDA, OpenCL). Know how to use that to your advantage.
There are very good techniques for moving processing loads to memory like:
- memoization,
- loop unrolling,
- hash tables.
Also, it's good to keep in mind the hierarchy of memory: CPU registers (256 bytes), cache (1M), RAM (1G), SWAP (10G), network (1T) (as if). This is a rough order-of-magnitude guide. You'll have to know your system.
Not caring about CPU is like keeping a sports car in 4th gear, when it should be in 5th. Sure you can do it, and it's not really red-lining, but you're making a lot of excess noise, wearing out parts you probably don't know of, and you look utterly foolish to those who actually race cars for a living.