10 ms·
Rough idling
- vezzy-fnord 11y agoRelated, a famous example of how "doing nothing" can be a surprisingly difficult problem: https://en.wikipedia.org/wiki/IEFBR14 https://en.wikipedia.org/wiki/IEFBR14
- bch 11y agoYour example doesn't obviously support this, but reminded me of Mark Twain's "I didn't have time to write a short letter, so I wrote a long one instead."
- vezzy-fnord 11y agoActually Blaise Pascal's, from Provincial Letters XVI.
- npizzolato 11y agoI like the story of how Grep is fast because it tries to do as little work as possible. https://lists.freebsd.org/pipermail/freebsd-current/2010-August/019310.html https://lists.freebsd.org/pipermail/freebsd-current/2010-Aug...
- w8rbt 11y agoReminds me of the best optimization advice I ever got, "If you want to go faster, do less."
- bitbckt 11y agoNo code is faster than no code.
- agumonkey 11y agoVery nice self referential quote. Who coined it ? ps: LMGTFM https://en.wikipedia.org/wiki/Kevlin_Henney https://en.wikipedia.org/wiki/Kevlin_Henney
- grrowl 11y agoThe first time encountering a certain JS library's $.noop function bent my brain — "why would there be a function for not calling a function?" Later, wisdom visited me and I realised the costs of `typeof isThisAFunction` and the savings of optimising out an empty function call in the first place.
- draw_down 11y agoOne time a guy in Key West told me "If you want to get there faster, run."
- eru 11y agoMore complicated these days, since you can do more overall, but in shorter time, if you do it on more cores.
- eru 11y agoOr if you manage to fit it all into cache.
- DArcMattr 11y agoAnd here's some discussion on making OpenBSD's sleep more efficient (starting with a proposed patch from tedu): http://marc.info/?l=openbsd-tech&m=144280057027331&w=2 http://marc.info/?l=openbsd-tech&m=144280057027331&w=2
- caf 11y agoOn Linux, the "powertop" utility will show you processes that are waking up regularly (such processes can cost you battery life on a laptop or phone by preventing the CPU entering and maintaining low power idle states).
- peterwwillis 11y agoOn very fast local systems and networks, 'rough idling' can go on for a very long time, until it comes time to scale. One time I found the cause of a program that was run at regular intervals and was taking a few minutes to complete running. It would run approximately 42,000 SQL select calls every time it dropped into a new directory to parse some files. It only took 10 minutes to process the entire directory structure. So the program was actually incredibly fast, considering all the work it was doing. The catch? It only needed to run SQL select 42 times per directory; the other 41,958 calls were not necessary. As far as I know it was never fixed, because it only took 10 minutes to run.
- spydum 11y agothis reminds me of http://accidentallyquadratic.tumblr.com/ http://accidentallyquadratic.tumblr.com/
- ansible 11y agoI would speculate that even if hardware progress were to stop today, we would still see advancement in the speed of computer systems for quite some time. All just from optimizing what we are already doing, or (as others have pointed out) not doing unnecessary things. There are so many things I'd like to fix if I had the time...
- cperciva 11y agoYou're clearly an optimist. I find that the tendency is for software to get slower -- and generally worse -- over time. Five years ago I was using Chrome and it was fast, lightweight, and stable. Now it's slow, uses 500 MB of RAM, and the renderer crashes on a regular basis.
- deleted 11y ago[deleted]
- ansible 11y agoWell, yeah, it is certainly possible for software projects to go the other way. It depends on what the focus is. If people knew that their own choice for speed improvements was optimization (and to a certain extent, that is true already), then they might focus more on that instead of adding features.
- agumonkey 11y agoI'm still hoping for the whole stack to flatten significantly with PL guys managing to allow for multistage/multilayer JIT optimization over evaluation towers.
- cortesoft 11y agoA couple of things might influence this observation: 1) Your definition of what is fast changes. Downloading an MP3 in 5 minutes felt really fast in 1998, but really slow today. 2) What we expect chrome to do keeps increasing. Since Chrome was so fast, people started creating webpages that had to do more (because they could!) It is a form of Induced Demand (https://en.wikipedia.org/wiki/Induced_demand https://en.wikipedia.org/wiki/Induced_demand)
- hackuser 11y agoDoes anyone know under what circumstances changes to software can significantly impact energy consumption? I'm thinking of this from the perspective of the environment and of impacting climate change. How often is that considered, outside of mobile platforms? What are the largest opportunities, if there are any big ones? For example, TCP is so widely used and affects so many machines with each transaction (i.e., the endpoints and everything in between) that I'd guess that a tiny increase could make a large impact globally. Or there might be other software where there's an opportunity for a large improvement.
- mmagin 11y agoWell, there's Bitcoin. Its very existence encourages a lot of energy to be spent on a fairly small transaction volume.
- seiji 11y agoHow often is that considered, outside of mobile platforms? Never. Flash Player should be a crime against humanity based on its energy usage alone.
- 13thLetter 11y agoI was immediately skeptical, but then I looked around and found some articles claiming that as of 2013 computing in general accounted for fully ten percent of global electricity usage. So maybe we should be putting some thought into this issue after all.
- deleted 11y ago[deleted]
- jerf 11y agoIt should be pointed out that we do in many places. Mobile has significant incentive to be efficient. Cloud has significant incentive to be efficient. Mobile efficiency creeps into a lot of other home tech because it's cheap to use that highly-scaled mobile technology now, because it's off-the-shelf. The worst is probably stuff headed for the home that is too big to use SOCs, like desktops and game consoles. But it's not as if the entire industry is oblivious to this issue... Performance-per-watt is an already-important metric, and it will only get more important. https://en.wikipedia.org/wiki/Performance_per_watt https://en.wikipedia.org/wiki/Performance_per_watt
- throwaway2048 11y agoBe sure to check out the powertop tool, it can be very useful in measuring how often something is waking up the processor when it should be idle.
- TazeTSchnitzel 11y agoSince OS X Mavericks, Apple's been cracking down on programs that wake up the CPU too much. Thus the infamous hall of shame in the battery status menu.
- Animats 11y agoBack around 2004, when I was using QNX for our DARPA Grand Challenge vehicle, I discovered that the machines on the vehicle were about 20-30% loaded when idle. Although they had no keyboards or displays, the embedded CPU boards we were using did have a minimal VGA controller. We were using the default QNX install, which has the full desktop environment, and it was bringing up a screen saver. The minimal VGA controller ran the screen saver very slowly, because the screen saver was reading from the display memory to scroll, a very slow process. All this was at low priority, so it didn't affect the real time tasks at all. So it wasn't hurting anything. The QNX people were quite embarrassed when we reported this, though.
- wfn 11y agoWhat's the language at the bottom of the post, the one that is able to allocate custom `structs` and has some OOP stuff in it?