Zeroith, use a fully static machine that can stop when idle. You cannot beat zero Hz.
First go to the keyless scheduler. Awakening every milliseconds or so is wasting energy. If you cannot, consider slowing down the scheduler interrupt.
Secondly, make sure that your idle thread is power-saving, wait for the next interrupt instruction. You can do this in the form of an underdeveloped “user field” that most small devices have.
Thirdly, if you need to interrogate or perform user actions, such as updating the user interface, sleep, do it and fall asleep again.
Do not trust GUI frameworks that you haven’t tested for sleep and rotation. Especially for an event timer you can tempt to use for # 2.
Block the stream while reading instead of polling with select () / epoll () / WaitForMultipleObjects (). Puts stress on the thread twist (and your brain), but the device is usually all right. This ultimately changed your design a bit to a high standard; he becomes more accurate !. The main loop, which checks everything you need, ends up slow and wasteful on the processor, but guarantees performance. (Guaranteed to be slow)
Cache results lazily create things. Users expect the device to be slow, so don't disappoint them. Less works better. Run as little as possible. Individual threads may be destroyed when you stop executing them.
Try to get more memory than you need, then you can insert into multiple hash tables and save the search ever. This is a direct compromise if the memory is DRAM.
Look at the real-time system than you think you might need. This saves time (sic) later. They also handle streams.
Tim Williscroft Sep 15 '08 at 5:37 2008-09-15 05:37
source share